mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Fix thread hole index
This commit is contained in:
@@ -81,6 +81,7 @@ final class MessageHistoryMetadataTable: Table {
|
|||||||
private func peerThreadHoleIndexInitializedKey(peerId: PeerId, threadId: Int64) -> ValueBoxKey {
|
private func peerThreadHoleIndexInitializedKey(peerId: PeerId, threadId: Int64) -> ValueBoxKey {
|
||||||
self.sharedPeerThreadHoleIndexInitializedKey.setInt64(0, value: peerId.toInt64())
|
self.sharedPeerThreadHoleIndexInitializedKey.setInt64(0, value: peerId.toInt64())
|
||||||
self.sharedPeerThreadHoleIndexInitializedKey.setInt8(8, value: MetadataPrefix.PeerHistoryThreadHoleIndexInitialized.rawValue)
|
self.sharedPeerThreadHoleIndexInitializedKey.setInt8(8, value: MetadataPrefix.PeerHistoryThreadHoleIndexInitialized.rawValue)
|
||||||
|
self.sharedPeerThreadHoleIndexInitializedKey.setInt64(0, value: threadId)
|
||||||
return self.sharedPeerThreadHoleIndexInitializedKey
|
return self.sharedPeerThreadHoleIndexInitializedKey
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -110,6 +110,7 @@ final class MessageHistoryThreadHoleIndexTable: Table {
|
|||||||
|
|
||||||
private func ensureInitialized(peerId: PeerId, threadId: Int64) {
|
private func ensureInitialized(peerId: PeerId, threadId: Int64) {
|
||||||
if !self.metadataTable.isThreadHoleIndexInitialized(peerId: peerId, threadId: threadId) {
|
if !self.metadataTable.isThreadHoleIndexInitialized(peerId: peerId, threadId: threadId) {
|
||||||
|
postboxLog("MessageHistoryThreadHoleIndexTable: Initializing \(peerId) \(threadId)")
|
||||||
self.metadataTable.setIsThreadHoleIndexInitialized(peerId: peerId, threadId: threadId)
|
self.metadataTable.setIsThreadHoleIndexInitialized(peerId: peerId, threadId: threadId)
|
||||||
|
|
||||||
if let messageNamespaces = self.seedConfiguration.messageThreadHoles[peerId.namespace] {
|
if let messageNamespaces = self.seedConfiguration.messageThreadHoles[peerId.namespace] {
|
||||||
|
|||||||
Reference in New Issue
Block a user