diff --git a/submodules/TelegramCore/Sources/State/Serialization.swift b/submodules/TelegramCore/Sources/State/Serialization.swift index 51506fd6da..b54867d1ff 100644 --- a/submodules/TelegramCore/Sources/State/Serialization.swift +++ b/submodules/TelegramCore/Sources/State/Serialization.swift @@ -210,7 +210,7 @@ public class BoxedMessage: NSObject { public class Serialization: NSObject, MTSerialization { public func currentLayer() -> UInt { - return 173 + return 172 } public func parseMessage(_ data: Data!) -> Any! { diff --git a/submodules/TelegramCore/Sources/Utils/MessageUtils.swift b/submodules/TelegramCore/Sources/Utils/MessageUtils.swift index 22173d47cb..ec50d045a4 100644 --- a/submodules/TelegramCore/Sources/Utils/MessageUtils.swift +++ b/submodules/TelegramCore/Sources/Utils/MessageUtils.swift @@ -489,13 +489,13 @@ public extension Message { public extension Message { func areReactionsTags(accountPeerId: PeerId) -> Bool { - if self.id.peerId == accountPeerId { + /*if self.id.peerId == accountPeerId { if let reactionsAttribute = self.reactionsAttribute, !reactionsAttribute.reactions.isEmpty { return reactionsAttribute.isTags } else { return true } - } + }*/ return false } } diff --git a/submodules/TelegramUI/Sources/ChatController.swift b/submodules/TelegramUI/Sources/ChatController.swift index b1de49a714..a67226fc53 100644 --- a/submodules/TelegramUI/Sources/ChatController.swift +++ b/submodules/TelegramUI/Sources/ChatController.swift @@ -5219,7 +5219,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G isPremiumRequiredForMessaging ).startStrict(next: { [weak self] peerView, globalNotificationSettings, onlineMemberCount, hasScheduledMessages, peerReportNotice, pinnedCount, threadInfo, hasSearchTags, isPremiumRequiredForMessaging in if let strongSelf = self { - if strongSelf.peerView === peerView && strongSelf.reportIrrelvantGeoNotice == peerReportNotice && strongSelf.hasScheduledMessages == hasScheduledMessages && strongSelf.threadInfo == threadInfo { + if strongSelf.peerView === peerView && strongSelf.reportIrrelvantGeoNotice == peerReportNotice && strongSelf.hasScheduledMessages == hasScheduledMessages && strongSelf.threadInfo == threadInfo && strongSelf.presentationInterfaceState.hasSearchTags == hasSearchTags && strongSelf.presentationInterfaceState.isPremiumRequiredForMessaging == isPremiumRequiredForMessaging { return } @@ -5440,6 +5440,9 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G } } } + if strongSelf.presentationInterfaceState.search != nil && strongSelf.presentationInterfaceState.hasSearchTags { + didDisplayActionsPanel = true + } var displayActionsPanel = false if let contactStatus = contactStatus, !contactStatus.isEmpty, let peerStatusSettings = contactStatus.peerStatusSettings { @@ -5457,6 +5460,9 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G } } } + if strongSelf.presentationInterfaceState.search != nil && hasSearchTags { + displayActionsPanel = true + } if displayActionsPanel != didDisplayActionsPanel { animated = true diff --git a/submodules/TelegramUI/Sources/TopMessageReactions.swift b/submodules/TelegramUI/Sources/TopMessageReactions.swift index 68530d0b43..2dceebf154 100644 --- a/submodules/TelegramUI/Sources/TopMessageReactions.swift +++ b/submodules/TelegramUI/Sources/TopMessageReactions.swift @@ -7,13 +7,20 @@ import ReactionSelectionNode func topMessageReactions(context: AccountContext, message: Message) -> Signal<[ReactionItem], NoError> { if message.id.peerId == context.account.peerId { - var loadTags = true + var loadTags = false if let effectiveReactionsAttribute = message.effectiveReactionsAttribute(isTags: message.areReactionsTags(accountPeerId: context.account.peerId)) { + loadTags = true if !effectiveReactionsAttribute.reactions.isEmpty { if !effectiveReactionsAttribute.isTags { loadTags = false } } + } else { + loadTags = true + } + + if "".isEmpty { + loadTags = false } if loadTags {