mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-21 08:59:08 +01:00
Support for fetchOffset in ListPublisher, optimize slicing logic
This commit is contained in:
@@ -91,13 +91,10 @@ extension Internals {
|
||||
dynamic func controllerDidChangeContent(_ controller: NSFetchedResultsController<NSFetchRequestResult>) {
|
||||
|
||||
var snapshot = Internals.DiffableDataSourceSnapshot(
|
||||
sections: controller.sections ?? []
|
||||
sections: controller.sections ?? [],
|
||||
fetchOffset: controller.fetchRequest.fetchOffset,
|
||||
fetchLimit: controller.fetchRequest.fetchLimit
|
||||
)
|
||||
let fetchLimit = controller.fetchRequest.fetchLimit
|
||||
if fetchLimit > 0 {
|
||||
|
||||
snapshot.resize(limit: fetchLimit)
|
||||
}
|
||||
snapshot.reloadSections(self.reloadedSectionIDs)
|
||||
snapshot.reloadItems(self.reloadedItemIDs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user