Merge branch 'develop' into prototype/containers

# Conflicts:
#	CoreStore.xcodeproj/project.pbxproj
#	Sources/DataStack+Transaction.swift
This commit is contained in:
John Estropia
2022-01-12 16:58:10 +09:00
146 changed files with 2645 additions and 10235 deletions
+6 -1
View File
@@ -113,6 +113,10 @@ extension NSManagedObjectContext {
return
}
let saveMetadata = rootContext.saveMetadata
context.saveMetadata = saveMetadata
let mergeChanges = { () -> Void in
if let updatedObjects = (note.userInfo?[NSUpdatedObjectsKey] as? Set<NSManagedObject>) {
@@ -123,8 +127,9 @@ extension NSManagedObjectContext {
}
}
context.mergeChanges(fromContextDidSave: note)
context.saveMetadata = nil
}
if rootContext.isSavingSynchronously == true {
if case true? = saveMetadata?.isSavingSynchronously {
context.performAndWait(mergeChanges)
}