Fix bug where ListMonitor sectionIndexTitles are not updated on refetch (fixes #218)

This commit is contained in:
John Rommel Estropia
2018-03-10 21:08:40 +09:00
parent 83e6082c56
commit c7fcba112e

View File

@@ -952,6 +952,8 @@ public final class ListMonitor<D: DynamicObject>: Hashable {
sectionBy: self.sectionBy,
applyFetchClauses: self.applyFetchClauses
)
newFetchedResultsControllerDelegate.enabled = false
newFetchedResultsControllerDelegate.handler = self
self.transactionQueue.async { [weak self] in
@@ -973,7 +975,7 @@ public final class ListMonitor<D: DynamicObject>: Hashable {
}
(self.fetchedResultsController, self.fetchedResultsControllerDelegate) = (newFetchedResultsController, newFetchedResultsControllerDelegate)
newFetchedResultsControllerDelegate.handler = self
newFetchedResultsControllerDelegate.enabled = true
self.isPendingRefetch = false