mirror of
https://github.com/modo-studio/SugarRecord.git
synced 2024-08-16 18:00:26 +03:00
Use the right NSFetchedResultsControllerDelegate method. Fix for Delegate method not being called. (CoreDataObservable with no informations #307) (#310)
This commit is contained in:
parent
dfd492a5c9
commit
75322fa966
@ -50,8 +50,8 @@ public class CoreDataObservable<T: NSManagedObject>: RequestObservable<T>, NSFet
|
||||
|
||||
|
||||
// MARK: - NSFetchedResultsControllerDelegate
|
||||
|
||||
@nonobjc public func controller(controller: NSFetchedResultsController<NSFetchRequestResult>, didChangeObject anObject: AnyObject, atIndexPath indexPath: IndexPath?, forChangeType type: NSFetchedResultsChangeType, newIndexPath: IndexPath?) {
|
||||
|
||||
public func controller(_ controller: NSFetchedResultsController<NSFetchRequestResult>, didChange anObject: Any, at indexPath: IndexPath?, for type: NSFetchedResultsChangeType, newIndexPath: IndexPath?) {
|
||||
switch type {
|
||||
case .delete:
|
||||
self.batchChanges.append(.delete(indexPath![0], anObject as! T))
|
||||
|
Loading…
Reference in New Issue
Block a user