Force fetchLimit for ListPublisher and ListSnapshot

This commit is contained in:
John Estropia committed 2019-11-14 20:34:48 +09:00
1 parent c2e4c033ef
commit b1decc9853
2 files changed
+22 -1

No files matched your search

@@ -93,6 +93,11 @@ extension Internals {
var snapshot = Internals.DiffableDataSourceSnapshot(
sections: controller.sections ?? []
)
let fetchLimit = controller.fetchRequest.fetchLimit
if fetchLimit > 0 {
snapshot.resize(limit: fetchLimit)
}
snapshot.reloadSections(self.reloadedSectionIDs)
snapshot.reloadItems(self.reloadedItemIDs)