mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Support Dynamic Type
This commit is contained in:
@@ -286,6 +286,20 @@ final class ChatListIndexTable: Table {
|
||||
alteredPeerIds.insert(peerId)
|
||||
}
|
||||
|
||||
var additionalAlteredPeerIds = Set<PeerId>()
|
||||
for peerId in alteredPeerIds {
|
||||
guard let peer = postbox.peerTable.get(peerId) else {
|
||||
continue
|
||||
}
|
||||
if let associatedPeerId = peer.associatedPeerId {
|
||||
additionalAlteredPeerIds.insert(associatedPeerId)
|
||||
}
|
||||
if let reverseAssociatedPeerId = postbox.reverseAssociatedPeerTable.get(peerId: peerId).first {
|
||||
additionalAlteredPeerIds.insert(reverseAssociatedPeerId)
|
||||
}
|
||||
}
|
||||
alteredPeerIds.formUnion(additionalAlteredPeerIds)
|
||||
|
||||
func alterTags(_ totalUnreadState: inout ChatListTotalUnreadState, _ peerId: PeerId, _ tag: PeerSummaryCounterTags, _ f: (ChatListTotalUnreadCounters, ChatListTotalUnreadCounters) -> (ChatListTotalUnreadCounters, ChatListTotalUnreadCounters)) {
|
||||
if totalUnreadState.absoluteCounters[tag] == nil {
|
||||
totalUnreadState.absoluteCounters[tag] = ChatListTotalUnreadCounters(messageCount: 0, chatCount: 0)
|
||||
@@ -404,10 +418,10 @@ final class ChatListIndexTable: Table {
|
||||
var initialFilteredStates: CombinedPeerReadState = initialStates
|
||||
var currentFilteredStates: CombinedPeerReadState = currentStates
|
||||
|
||||
if transactionParticipationInTotalUnreadCountUpdates.added.contains(peerId) {
|
||||
if transactionParticipationInTotalUnreadCountUpdates.added.contains(peerId) || transactionParticipationInTotalUnreadCountUpdates.added.contains(notificationPeerId) {
|
||||
initialFilteredValue = (0, false, false)
|
||||
initialFilteredStates = CombinedPeerReadState(states: [])
|
||||
} else if transactionParticipationInTotalUnreadCountUpdates.removed.contains(peerId) {
|
||||
} else if transactionParticipationInTotalUnreadCountUpdates.removed.contains(peerId) || transactionParticipationInTotalUnreadCountUpdates.removed.contains(notificationPeerId) {
|
||||
currentFilteredValue = (0, false, false)
|
||||
currentFilteredStates = CombinedPeerReadState(states: [])
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user