mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix PeerChatState casting
This commit is contained in:
parent
556572dd6d
commit
aaeea229a4
@ -272,7 +272,7 @@ public final class Transaction {
|
|||||||
|
|
||||||
public func getPeerChatState(_ id: PeerId) -> PeerChatState? {
|
public func getPeerChatState(_ id: PeerId) -> PeerChatState? {
|
||||||
assert(!self.disposed)
|
assert(!self.disposed)
|
||||||
return self.postbox?.peerChatStateTable.get(id) as? PeerChatState
|
return self.postbox?.peerChatStateTable.get(id)?.getLegacy() as? PeerChatState
|
||||||
}
|
}
|
||||||
|
|
||||||
public func setPeerChatState(_ id: PeerId, state: PeerChatState) {
|
public func setPeerChatState(_ id: PeerId, state: PeerChatState) {
|
||||||
@ -2715,7 +2715,7 @@ final class PostboxImpl {
|
|||||||
let messages = self.getMessageGroup(at: id)
|
let messages = self.getMessageGroup(at: id)
|
||||||
additionalDataEntries.append(.message(id, messages ?? []))
|
additionalDataEntries.append(.message(id, messages ?? []))
|
||||||
case let .peerChatState(peerId):
|
case let .peerChatState(peerId):
|
||||||
additionalDataEntries.append(.peerChatState(peerId, self.peerChatStateTable.get(peerId) as? PeerChatState))
|
additionalDataEntries.append(.peerChatState(peerId, self.peerChatStateTable.get(peerId)?.getLegacy() as? PeerChatState))
|
||||||
case .totalUnreadState:
|
case .totalUnreadState:
|
||||||
additionalDataEntries.append(.totalUnreadState(self.messageHistoryMetadataTable.getTotalUnreadState(groupId: .root)))
|
additionalDataEntries.append(.totalUnreadState(self.messageHistoryMetadataTable.getTotalUnreadState(groupId: .root)))
|
||||||
case let .peerNotificationSettings(peerId):
|
case let .peerNotificationSettings(peerId):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user