mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 14:45:21 +00:00
GIF-related fixes part 2
This commit is contained in:
@@ -130,11 +130,26 @@ final class MessageHistoryHoleIndexTable: Table {
|
||||
if !self.metadataTable.isInitialized(peerId) {
|
||||
self.metadataTable.setInitialized(peerId)
|
||||
if let tagsByNamespace = self.seedConfiguration.messageHoles[peerId.namespace] {
|
||||
for (namespace, _) in tagsByNamespace {
|
||||
for (namespace, tags) in tagsByNamespace {
|
||||
for tag in tags {
|
||||
self.metadataTable.setPeerTagInitialized(peerId: peerId, tag: tag)
|
||||
}
|
||||
var operations: [MessageHistoryIndexHoleOperationKey: [MessageHistoryIndexHoleOperation]] = [:]
|
||||
self.add(peerId: peerId, namespace: namespace, space: .everywhere, range: 1 ... (Int32.max - 1), operations: &operations)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if let tagsByNamespace = self.seedConfiguration.upgradedMessageHoles[peerId.namespace] {
|
||||
for (namespace, tags) in tagsByNamespace {
|
||||
for tag in tags {
|
||||
if !self.metadataTable.isPeerTagInitialized(peerId: peerId, tag: tag) {
|
||||
self.metadataTable.setPeerTagInitialized(peerId: peerId, tag: tag)
|
||||
var operations: [MessageHistoryIndexHoleOperationKey: [MessageHistoryIndexHoleOperation]] = [:]
|
||||
self.add(peerId: peerId, namespace: namespace, space: .tag(tag), range: 1 ... (Int32.max - 1), operations: &operations)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user