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

Handle load/save preferences inside ProfileEditor #982

Merged
merged 4 commits into from
Dec 8, 2024

Conversation

keeshux
Copy link
Member

@keeshux keeshux commented Dec 8, 2024

Simplify preferences model by doing a bulk load/save together with load/save Profile. ModulePreferences is now a struct rather than an ObservableObject, because it doesn't need ad hoc observation. It's just a binding to ProfileEditor.preferences

Fix:

  • Disable CloudKit in tunnel singleton of PreferencesManager (.sharedForTunnel)

Additionally:

  • Replace MainActor in PreferencesManager with Sendable (immutable)
  • Replace MainActor from ProviderPreferencesRepository with Sendable (syncs on NSManagedObjectContext)
  • Drop ModuleMetadata for good

@keeshux keeshux self-assigned this Dec 8, 2024
@keeshux keeshux added the refactoring Improves software architecture label Dec 8, 2024
@keeshux keeshux added this to the 3.0.0 / 6. Freeze milestone Dec 8, 2024
@keeshux keeshux force-pushed the refactoring/profile-editor-preferences branch from 430b0e5 to 6ca2e51 Compare December 8, 2024 14:44
@keeshux keeshux merged commit a4ebea1 into master Dec 8, 2024
@keeshux keeshux deleted the refactoring/profile-editor-preferences branch December 8, 2024 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Improves software architecture
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant