Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: usersettings profile entry when set in afterInit #4110

Merged
merged 3 commits into from
Jan 16, 2025

Conversation

hardl
Copy link
Contributor

@hardl hardl commented Jan 14, 2025

When you set userSettings configuration in luigiAfterInit only, an error is shown in console.
This is caused by checking a state var that is changed during execution of the (async) code by the second call.

@@ -80,7 +80,7 @@
const profileNavData = {
items: (await LuigiConfig.getConfigValueAsync('navigation.profile.items')) || []
};
if (hasUserSettings) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is some issue, then can we rely on 'hasUserSettings' in the template (line 210)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, it looks like, since the execution seems to behave 100% deterministic, but will double-check...

Copy link
Contributor

@walmazacn walmazacn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@hardl hardl merged commit c346cd2 into main Jan 16, 2025
11 checks passed
@hardl hardl deleted the fix-usersettings-profile branch January 16, 2025 09:28
@JohannesDoberer JohannesDoberer added bug Something isn't working ora ora related issues labels Jan 16, 2025
@JohannesDoberer JohannesDoberer mentioned this pull request Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ora ora related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants