- reaction count limit API

- my profile stories improvements
- recommended channels
This commit is contained in:
Isaac
2024-04-05 22:51:46 +04:00
parent 3689a8a07d
commit fa0929ef95
41 changed files with 2139 additions and 678 deletions

View File

@@ -309,6 +309,16 @@ final class ChatListTable: Table {
return result
}
func getAllPeerIds(groupId: PeerGroupId) -> [PeerId] {
var result: [PeerId] = []
self.valueBox.range(self.table, start: self.upperBound(groupId: groupId), end: self.lowerBound(groupId: groupId), keys: { key in
let (_, _, messageIndex, _) = extractKey(key)
result.append(messageIndex.id.peerId)
return true
}, limit: 0)
return result
}
func getUnreadChatListPeerIds(postbox: PostboxImpl, currentTransaction: Transaction, groupId: PeerGroupId, filterPredicate: ChatListFilterPredicate?, additionalFilter: ((Peer) -> Bool)?, stopOnFirstMatch: Bool) -> [PeerId] {
let globalNotificationSettings = postbox.getGlobalNotificationSettings(transaction: currentTransaction)