Fixed ListMonitor bug for CoreStoreObjects where ListObservers don't get update notifications

This commit is contained in:
John Estropia
2017-06-14 17:37:46 +09:00
parent 8c437e19b8
commit 801cf8d9f0
2 changed files with 198 additions and 30 deletions

View File

@@ -704,13 +704,13 @@ public final class ListMonitor<D: DynamicObject>: Hashable {
guard let `self` = self,
let userInfo = note.userInfo,
let object = userInfo[String(describing: NSManagedObject.self)] as? ObjectType else {
let rawObject = userInfo[String(describing: NSManagedObject.self)] as? NSManagedObject else {
return
}
callback(
self,
object,
ObjectType.cs_fromRaw(object: rawObject),
userInfo[String(describing: IndexPath.self)] as? IndexPath,
userInfo["\(String(describing: IndexPath.self)).New"] as? IndexPath
)