Skip to content

Commit

Permalink
Reduce number of syncs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jann Schafranek committed Sep 18, 2024
1 parent fb81603 commit b83fcc3
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ extension SDSSynchronizer {
// Changes cannot be handled here as we do not get useful information about the properties that have changed
handleChangedObjects(insertedObjects, inserted: true)

self.save()
if self.context.hasChanges {
self.save()
}
}

func handleChangedObjects(_ objects: [SDSSynchronizableContainer], inserted: Bool = false) {
Expand Down

0 comments on commit b83fcc3

Please sign in to comment.