fix section index titles when refetching a listMonitor

This commit is contained in:
John Estropia
2015-10-15 18:29:08 +09:00
parent 524757a7cf
commit 4792c4462e
2 changed files with 25 additions and 3 deletions

View File

@@ -840,7 +840,7 @@ public final class ListMonitor<T: NSManagedObject> {
return
}
strongSelf.fetchedResultsControllerDelegate.fetchedResultsController = nil
strongSelf.fetchedResultsControllerDelegate.enabled = false
let fetchRequest = strongSelf.fetchedResultsController.fetchRequest
for clause in fetchClauses {
@@ -864,7 +864,7 @@ public final class ListMonitor<T: NSManagedObject> {
return
}
strongSelf.fetchedResultsControllerDelegate.fetchedResultsController = strongSelf.fetchedResultsController
strongSelf.fetchedResultsControllerDelegate.enabled = true
strongSelf.isPendingRefetch = false
NSNotificationCenter.defaultCenter().postNotificationName(
@@ -1138,7 +1138,7 @@ extension ListMonitor: FetchedResultsControllerHandler {
}
internal func controller(controller: NSFetchedResultsController, sectionIndexTitleForSectionName sectionName: String?) -> String? {
return self.sectionIndexTransformer(sectionName: sectionName)
}
}