Various fixes

This commit is contained in:
Ilya Laktyushin
2025-01-25 02:33:41 +04:00
parent 2f8e6a4809
commit 3032fe0738
10 changed files with 44 additions and 39 deletions

View File

@@ -218,24 +218,26 @@ final class MutableItemCollectionsView {
}
}
let (entries, lower, higher) = aroundEntries(namespaces: namespaces,
aroundIndex: aroundIndex,
count: count, collectionIndexById: { id in
return postbox.itemCollectionInfoTable.getIndex(id: id)
},
lowerCollectionId: { namespaceList, collectionId, collectionIndex in
return self.lowerCollectionId(postbox: postbox, namespaceList: namespaceList, collectionId: collectionId, collectionIndex: collectionIndex)
},
fetchLowerItems: { collectionId, itemIndex, count in
return self.lowerItems(postbox: postbox, collectionId: collectionId, itemIndex: itemIndex, count: count)
},
higherCollectionId: { namespaceList, collectionId, collectionIndex in
return self.higherCollectionId(postbox: postbox, namespaceList: namespaceList, collectionId: collectionId, collectionIndex: collectionIndex)
},
fetchHigherItems: {
collectionId, itemIndex, count in
return self.higherItems(postbox: postbox, collectionId: collectionId, itemIndex: itemIndex, count: count)
})
let (entries, lower, higher) = aroundEntries(
namespaces: namespaces,
aroundIndex: aroundIndex,
count: count, collectionIndexById: { id in
return postbox.itemCollectionInfoTable.getIndex(id: id)
},
lowerCollectionId: { namespaceList, collectionId, collectionIndex in
return self.lowerCollectionId(postbox: postbox, namespaceList: namespaceList, collectionId: collectionId, collectionIndex: collectionIndex)
},
fetchLowerItems: { collectionId, itemIndex, count in
return self.lowerItems(postbox: postbox, collectionId: collectionId, itemIndex: itemIndex, count: count)
},
higherCollectionId: { namespaceList, collectionId, collectionIndex in
return self.higherCollectionId(postbox: postbox, namespaceList: namespaceList, collectionId: collectionId, collectionIndex: collectionIndex)
},
fetchHigherItems: {
collectionId, itemIndex, count in
return self.higherItems(postbox: postbox, collectionId: collectionId, itemIndex: itemIndex, count: count)
}
)
self.entries = entries
self.lower = lower