mirror of
https://github.com/modo-studio/SugarRecord.git
synced 2024-09-11 14:36:41 +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
|
// 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 {
|
switch type {
|
||||||
case .delete:
|
case .delete:
|
||||||
self.batchChanges.append(.delete(indexPath![0], anObject as! T))
|
self.batchChanges.append(.delete(indexPath![0], anObject as! T))
|
||||||
|
Loading…
Reference in New Issue
Block a user