mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-03 19:30:09 +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 totalUnreadState
|
||||||
case peerNotificationSettings(PeerId)
|
case peerNotificationSettings(PeerId)
|
||||||
case cacheEntry(ItemCacheEntryId)
|
case cacheEntry(ItemCacheEntryId)
|
||||||
|
case preferencesEntry(ValueBoxKey)
|
||||||
case peer(PeerId)
|
case peer(PeerId)
|
||||||
case peerIsContact(PeerId)
|
case peerIsContact(PeerId)
|
||||||
}
|
}
|
||||||
@ -29,6 +30,7 @@ public enum AdditionalMessageHistoryViewDataEntry {
|
|||||||
case totalUnreadState(ChatListTotalUnreadState)
|
case totalUnreadState(ChatListTotalUnreadState)
|
||||||
case peerNotificationSettings(PeerNotificationSettings?)
|
case peerNotificationSettings(PeerNotificationSettings?)
|
||||||
case cacheEntry(ItemCacheEntryId, PostboxCoding?)
|
case cacheEntry(ItemCacheEntryId, PostboxCoding?)
|
||||||
|
case preferencesEntry(ValueBoxKey, PreferencesEntry?)
|
||||||
case peerIsContact(PeerId, Bool)
|
case peerIsContact(PeerId, Bool)
|
||||||
case peer(PeerId, Peer?)
|
case peer(PeerId, Peer?)
|
||||||
}
|
}
|
||||||
@ -1069,6 +1071,8 @@ final class MutableMessageHistoryView {
|
|||||||
self.additionalDatas[i] = .cacheEntry(entryId, postbox.retrieveItemCacheEntry(id: entryId))
|
self.additionalDatas[i] = .cacheEntry(entryId, postbox.retrieveItemCacheEntry(id: entryId))
|
||||||
hasChanges = true
|
hasChanges = true
|
||||||
}
|
}
|
||||||
|
case .preferencesEntry:
|
||||||
|
break
|
||||||
case let .peerIsContact(peerId, value):
|
case let .peerIsContact(peerId, value):
|
||||||
if let replacedPeerIds = transaction.replaceContactPeerIds {
|
if let replacedPeerIds = transaction.replaceContactPeerIds {
|
||||||
let updatedValue: Bool
|
let updatedValue: Bool
|
||||||
|
@ -2545,6 +2545,8 @@ public final class Postbox {
|
|||||||
additionalDataEntries.append(.peerNotificationSettings(self.peerNotificationSettingsTable.getEffective(notificationPeerId)))
|
additionalDataEntries.append(.peerNotificationSettings(self.peerNotificationSettingsTable.getEffective(notificationPeerId)))
|
||||||
case let .cacheEntry(entryId):
|
case let .cacheEntry(entryId):
|
||||||
additionalDataEntries.append(.cacheEntry(entryId, self.retrieveItemCacheEntry(id: 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):
|
case let .peerIsContact(peerId):
|
||||||
let value: Bool
|
let value: Bool
|
||||||
if let contactPeer = self.peerTable.get(peerId), let associatedPeerId = contactPeer.associatedPeerId {
|
if let contactPeer = self.peerTable.get(peerId), let associatedPeerId = contactPeer.associatedPeerId {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user