Skip to content

Commit

Permalink
Further 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 b83fcc3 commit 627dbe6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ extension SDSSynchronizer {
// Changes cannot be handled here as we do not get useful information about the properties that have changed
handleChangedObjects(insertedObjects, inserted: true)

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

func handleChangedObjects(_ objects: [SDSSynchronizableContainer], inserted: Bool = false) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ extension SDSSynchronizer {
let nserror = error as NSError
fatalError("Unresolved error saving SDSSynchronizer.context \(nserror), \(nserror.userInfo)")
}

self.startSync()
}

self.startSync()
}
}
}

0 comments on commit 627dbe6

Please sign in to comment.