mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
[WIP] Topics
This commit is contained in:
@@ -329,7 +329,7 @@ final class MessageHistoryThreadHoleIndexTable: Table {
|
||||
self.valueBox.set(self.table, key: self.key(threadId: threadId, id: MessageId(peerId: peerId, namespace: namespace, id: closedRange.upperBound), space: space), value: MemoryBuffer(memory: &lowerBound, capacity: 4, length: 4, freeWhenDone: false))
|
||||
}
|
||||
|
||||
//addOperation(.insert(clippedRange), peerId: peerId, namespace: namespace, space: space, to: &operations)
|
||||
addMessageHistoryHoleOperation(.insert(clippedRange), peerId: peerId, threadId: threadId, namespace: namespace, space: space, to: &operations)
|
||||
}
|
||||
|
||||
func remove(peerId: PeerId, threadId: Int64, namespace: MessageId.Namespace, space: MessageHistoryHoleSpace, range: ClosedRange<MessageId.Id>, operations: inout [MessageHistoryIndexHoleOperationKey: [MessageHistoryIndexHoleOperation]]) {
|
||||
@@ -337,7 +337,7 @@ final class MessageHistoryThreadHoleIndexTable: Table {
|
||||
|
||||
self.removeInternal(peerId: peerId, threadId: threadId, namespace: namespace, space: space, range: range, operations: &operations)
|
||||
|
||||
/*switch space {
|
||||
switch space {
|
||||
case .everywhere:
|
||||
if let namespaceHoleTags = self.seedConfiguration.messageHoles[peerId.namespace]?[namespace] {
|
||||
for tag in namespaceHoleTags {
|
||||
@@ -346,7 +346,7 @@ final class MessageHistoryThreadHoleIndexTable: Table {
|
||||
}
|
||||
case .tag:
|
||||
break
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
private func removeInternal(peerId: PeerId, threadId: Int64, namespace: MessageId.Namespace, space: MessageHistoryHoleSpace, range: ClosedRange<MessageId.Id>, operations: inout [MessageHistoryIndexHoleOperationKey: [MessageHistoryIndexHoleOperation]]) {
|
||||
@@ -393,9 +393,9 @@ final class MessageHistoryThreadHoleIndexTable: Table {
|
||||
self.valueBox.set(self.table, key: self.key(threadId: threadId, id: MessageId(peerId: peerId, namespace: namespace, id: closedRange.upperBound), space: space), value: MemoryBuffer(memory: &lowerBound, capacity: 4, length: 4, freeWhenDone: false))
|
||||
}
|
||||
|
||||
/*if !removeKeys.isEmpty {
|
||||
addOperation(.remove(range), peerId: peerId, namespace: namespace, space: space, to: &operations)
|
||||
}*/
|
||||
if !removeKeys.isEmpty {
|
||||
addMessageHistoryHoleOperation(.remove(range), peerId: peerId, threadId: threadId, namespace: namespace, space: space, to: &operations)
|
||||
}
|
||||
}
|
||||
|
||||
func debugList(peerId: PeerId, threadId: Int64, namespace: MessageId.Namespace, space: MessageHistoryHoleSpace) -> [ClosedRange<MessageId.Id>] {
|
||||
|
||||
Reference in New Issue
Block a user