[WIP] Topics

This commit is contained in:
Ali
2022-10-12 18:17:59 +04:00
parent 508cbc7366
commit adc94814c9
2 changed files with 11 additions and 8 deletions

View File

@@ -420,10 +420,12 @@ final class MutableMessageHistoryView {
func updatePeerIds(transaction: PostboxTransaction) {
switch self.peerIds {
case let .single(peerId, _):
if let updatedData = transaction.currentUpdatedCachedPeerData[peerId] {
if updatedData.associatedHistoryMessageId != nil {
self.peerIds = .associated(peerId, updatedData.associatedHistoryMessageId)
case let .single(peerId, threadId):
if threadId == nil {
if let updatedData = transaction.currentUpdatedCachedPeerData[peerId] {
if updatedData.associatedHistoryMessageId != nil {
self.peerIds = .associated(peerId, updatedData.associatedHistoryMessageId)
}
}
}
case let .associated(peerId, associatedId):