Skip to content

fix(settings): persist auto update check toggle - #194

Merged
jsattler merged 1 commit into
mainfrom
192-automatically-check-for-updates-is-not-persisting-between-tab-changing
Aug 29, 2026
Merged

jsattler merged 1 commit into
mainfrom
192-automatically-check-for-updates-is-not-persisting-between-tab-changing

Conversation

@jsattler

Copy link
Copy Markdown
Owner

The toggle was bound to a private @State mirror seeded once in GeneralSettingsView.init, which SwiftUI re-seeded from a stale value when the Settings tab was switched away and back.

Fixes #192

The toggle was bound to a private @State mirror seeded once in
GeneralSettingsView.init, which SwiftUI re-seeded from a stale value when
the Settings tab was switched away and back.

UpdaterService.automaticallyChecksForUpdates was a plain computed
pass-through, so the @observable macro did not track it and binding
directly to it was not an option. Wrap it in access/withMutation and bind
the Toggle straight to the service, leaving Sparkle as the only source of
truth.

Also install the canCheckForUpdates KVO observation regardless of whether
the Sparkle public key is present, so debug builds exercise the same code
path as release builds.

Fixes #192
@jsattler jsattler linked an issue Aug 29, 2026 that may be closed by this pull request
1 of 7 tasks
@jsattler
jsattler merged commit 8ecd63b into main Aug 29, 2026
3 checks passed
@jsattler
jsattler deleted the 192-automatically-check-for-updates-is-not-persisting-between-tab-changing branch August 29, 2026 19:46
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.

"Automatically check for updates" is not persisting between tab changing

1 participant