temporarily fix an Xcode 7 bug (still present as of beta 5) (temporarily fixes #12)

This commit is contained in:
John Rommel Estropia
2015-08-23 14:02:27 +09:00
parent 7555ff3ad0
commit 093c1d410f
2 changed files with 6 additions and 3 deletions

View File

@@ -779,7 +779,7 @@ extension ListMonitor: FetchedResultsControllerHandler {
]
)
case .Move:
case .Move where indexPath != newIndexPath:
NSNotificationCenter.defaultCenter().postNotificationName(
ListMonitorDidMoveObjectNotification,
object: self,
@@ -789,6 +789,9 @@ extension ListMonitor: FetchedResultsControllerHandler {
UserInfoKeyNewIndexPath: newIndexPath!
]
)
default:
break
}
}

View File

@@ -179,7 +179,7 @@ public final class ObjectMonitor<T: NSManagedObject> {
let fetchRequest = NSFetchRequest()
fetchRequest.entity = object.entity
fetchRequest.fetchLimit = 1
fetchRequest.fetchLimit = 0
fetchRequest.resultType = .ManagedObjectResultType
fetchRequest.sortDescriptors = []
@@ -288,7 +288,7 @@ extension ObjectMonitor: FetchedResultsControllerHandler {
userInfo: [UserInfoKeyObject: anObject]
)
case .Update:
case .Update, .Move where indexPath == newIndexPath:
NSNotificationCenter.defaultCenter().postNotificationName(
ObjectMonitorDidUpdateObjectNotification,
object: self,