mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-31 18:02:20 +00:00
Added preferencesEntry additional data item to MessageHistoryView
This commit is contained in:
parent
0f171b185e
commit
3acf98d4cc
@ -17,6 +17,7 @@ public enum AdditionalMessageHistoryViewData {
|
||||
case totalUnreadState
|
||||
case peerNotificationSettings(PeerId)
|
||||
case cacheEntry(ItemCacheEntryId)
|
||||
case preferencesEntry(ValueBoxKey)
|
||||
case peer(PeerId)
|
||||
case peerIsContact(PeerId)
|
||||
}
|
||||
@ -29,6 +30,7 @@ public enum AdditionalMessageHistoryViewDataEntry {
|
||||
case totalUnreadState(ChatListTotalUnreadState)
|
||||
case peerNotificationSettings(PeerNotificationSettings?)
|
||||
case cacheEntry(ItemCacheEntryId, PostboxCoding?)
|
||||
case preferencesEntry(ValueBoxKey, PreferencesEntry?)
|
||||
case peerIsContact(PeerId, Bool)
|
||||
case peer(PeerId, Peer?)
|
||||
}
|
||||
@ -1069,6 +1071,8 @@ final class MutableMessageHistoryView {
|
||||
self.additionalDatas[i] = .cacheEntry(entryId, postbox.retrieveItemCacheEntry(id: entryId))
|
||||
hasChanges = true
|
||||
}
|
||||
case .preferencesEntry:
|
||||
break
|
||||
case let .peerIsContact(peerId, value):
|
||||
if let replacedPeerIds = transaction.replaceContactPeerIds {
|
||||
let updatedValue: Bool
|
||||
|
@ -2545,6 +2545,8 @@ public final class Postbox {
|
||||
additionalDataEntries.append(.peerNotificationSettings(self.peerNotificationSettingsTable.getEffective(notificationPeerId)))
|
||||
case let .cacheEntry(entryId):
|
||||
additionalDataEntries.append(.cacheEntry(entryId, self.retrieveItemCacheEntry(id: entryId)))
|
||||
case let .preferencesEntry(key):
|
||||
additionalDataEntries.append(.preferencesEntry(key, self.preferencesTable.get(key: key)))
|
||||
case let .peerIsContact(peerId):
|
||||
let value: Bool
|
||||
if let contactPeer = self.peerTable.get(peerId), let associatedPeerId = contactPeer.associatedPeerId {
|
||||
|
Loading…
x
Reference in New Issue
Block a user