mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-27 04:14:21 +00:00
FetchedResultsController: don’t notify delegate when there is no change
This commit is contained in:
1 parent
d5d467192d
commit
09abd1e5cd
1 file changed
+3
@@ -317,6 +317,9 @@ extension FetchedResultsController : TransactionObserverType {
|
||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)) {
|
||||
let oldItems = self.fetchedItems!
|
||||
let changes = FetchedResultsController.computeChanges(fromRows: oldItems, toRows: newItems, identityComparator: self.identityComparator)
|
||||
guard !changes.isEmpty else {
|
||||
return
|
||||
}
|
||||
|
||||
dispatch_async(dispatch_get_main_queue()) {
|
||||
self.delegate?.controllerWillUpdate(self)
|
||||
|
||||
Reference in new issue
Block a user