mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Support view as messages api
This commit is contained in:
@@ -71,6 +71,18 @@ func _internal_resetAccountState(postbox: Postbox, network: Network, accountPeer
|
||||
}
|
||||
})
|
||||
}
|
||||
for (peerId, value) in fetchedChats.viewForumAsMessages {
|
||||
if value {
|
||||
transaction.updatePeerCachedData(peerIds: Set([peerId]), update: { _, current in
|
||||
if peerId.namespace == Namespaces.Peer.CloudChannel {
|
||||
let current = (current as? CachedChannelData) ?? CachedChannelData()
|
||||
return current.withUpdatedViewForumAsMessages(.known(value))
|
||||
} else {
|
||||
return current
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
for hole in transaction.allChatListHoles(groupId: .root) {
|
||||
transaction.replaceChatListHole(groupId: .root, index: hole.index, hole: nil)
|
||||
|
||||
Reference in New Issue
Block a user