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

Remove explicit ModelContext saves from SwiftDataStore #9

Open
cfoughty7 opened this issue Dec 10, 2024 · 0 comments
Open

Remove explicit ModelContext saves from SwiftDataStore #9

cfoughty7 opened this issue Dec 10, 2024 · 0 comments
Assignees

Comments

@cfoughty7
Copy link
Contributor

The SwiftDataStore only uses the ModelContainers main context, so there should really be no need for explicit saves in the SwiftDataStore. Explicit saves can cause undesirable animation issues in views when inserting objects that drive views. The SwiftDataStore contract can be updated to make it clear that any needed explicit saves should be done by the consumer of the dependency.

@cfoughty7 cfoughty7 self-assigned this Dec 10, 2024
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

No branches or pull requests

1 participant