diff --git a/submodules/Postbox/Sources/MessageHistoryTagsSummaryTable.swift b/submodules/Postbox/Sources/MessageHistoryTagsSummaryTable.swift index 2ec1ad130c..ae2ca6183f 100644 --- a/submodules/Postbox/Sources/MessageHistoryTagsSummaryTable.swift +++ b/submodules/Postbox/Sources/MessageHistoryTagsSummaryTable.swift @@ -173,7 +173,9 @@ class MessageHistoryTagsSummaryTable: Table { } func getCustomTags(tag: MessageTags, peerId: PeerId, threadId: Int64?, namespace: MessageId.Namespace) -> [MemoryBuffer] { - let peerKey = self.keyInternal(key: MessageHistoryTagsSummaryKey(tag: tag, peerId: peerId, threadId: threadId, namespace: namespace, customTag: nil), allowShared: false) + let key = MessageHistoryTagsSummaryKey(tag: tag, peerId: peerId, threadId: threadId, namespace: namespace, customTag: nil) + + let peerKey = self.keyInternal(key: key, allowShared: false) let prefixLength = 4 + 8 + 4 + 8 var result: [MemoryBuffer] = [] self.valueBox.range(self.table, start: peerKey.predecessor, end: peerKey.successor, keys: { key in @@ -187,6 +189,17 @@ class MessageHistoryTagsSummaryTable: Table { } return true }, limit: 0) + + for updatedKey in self.updatedKeys { + if updatedKey.peerId == peerId && updatedKey.tag == tag && updatedKey.threadId == threadId && updatedKey.namespace == namespace { + if let customTag = updatedKey.customTag { + if !result.contains(customTag) { + result.append(customTag) + } + } + } + } + return result } diff --git a/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/PeerInfoHeaderNavigationButton.swift b/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/PeerInfoHeaderNavigationButton.swift index 506ac2135f..0f54c0fc1f 100644 --- a/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/PeerInfoHeaderNavigationButton.swift +++ b/submodules/TelegramUI/Components/PeerInfo/PeerInfoScreen/Sources/PeerInfoHeaderNavigationButton.swift @@ -287,7 +287,7 @@ final class PeerInfoHeaderNavigationButton: HighlightableButtonNode { self.textNode.attributedText = NSAttributedString(string: text, font: font, textColor: .white) transition.updateTintColor(layer: self.textNode.layer, color: self.contentsColor) self.iconNode.image = icon - transition.updateTintColor(layer: self.iconNode.layer, color: self.contentsColor) + transition.updateTintColor(view: self.iconNode.view, color: self.contentsColor) if isAnimation { self.iconNode.isHidden = true