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

Force reload from UserDefaults for Algorithm Experiments #2297

Merged
merged 2 commits into from
Mar 21, 2025

Conversation

marionbarker
Copy link
Contributor

Previous PR #2279 was accidentally merged while pointing to the main branch.

That PR referred to Issue #2267. However, Issue #2267 is actually fixed with LoopKit PR 555.

This PR properly points to the dev branch and makes the same code change as 2279.

This PR fixes an issue where the algorithm experiment settings displayed may be stale.

This is caused by the view being discarded from the render tree and then being restored as it was initialized.

This fix addresses this and cleans up the code as well by using AppStorage - the selection views themselves then only work with the Bindings and not directly with UserDefaults.

@marionbarker marionbarker requested a review from ps2 March 21, 2025 21:03
@marionbarker marionbarker merged commit 710182e into dev Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants