diff --git a/submodules/TelegramUI/Components/PeerInfo/PeerInfoChatPaneNode/Sources/PeerInfoChatPaneNode.swift b/submodules/TelegramUI/Components/PeerInfo/PeerInfoChatPaneNode/Sources/PeerInfoChatPaneNode.swift index 5fa729736d..2acf7e0072 100644 --- a/submodules/TelegramUI/Components/PeerInfo/PeerInfoChatPaneNode/Sources/PeerInfoChatPaneNode.swift +++ b/submodules/TelegramUI/Components/PeerInfo/PeerInfoChatPaneNode/Sources/PeerInfoChatPaneNode.swift @@ -164,6 +164,18 @@ public final class PeerInfoChatPaneNode: ASDisplayNode, PeerInfoPaneNode, UIScro self.presentationData = presentationData }) + let strings = self.presentationData.strings + self.statusPromise.set(self.context.engine.data.subscribe( + TelegramEngine.EngineData.Item.Messages.MessageCount(peerId: self.context.account.peerId, threadId: peerId.toInt64(), tag: []) + ) + |> map { count in + if let count { + return PeerInfoStatusData(text: strings.Conversation_Messages(Int32(count)), isActivity: false, key: .savedMessages) + } else { + return nil + } + }) + self.ready.set(self.chatController.ready.get()) self.addSubnode(self.chatController.displayNode) diff --git a/submodules/TelegramUI/Components/PeerInfo/PeerInfoPaneNode/Sources/PeerInfoPaneNode.swift b/submodules/TelegramUI/Components/PeerInfo/PeerInfoPaneNode/Sources/PeerInfoPaneNode.swift index 1208db53df..328d0612e5 100644 --- a/submodules/TelegramUI/Components/PeerInfo/PeerInfoPaneNode/Sources/PeerInfoPaneNode.swift +++ b/submodules/TelegramUI/Components/PeerInfo/PeerInfoPaneNode/Sources/PeerInfoPaneNode.swift @@ -9,6 +9,8 @@ public enum PeerInfoPaneKey: Int32 { case members case stories case media + case savedMessagesChats + case savedMessages case files case music case voice @@ -16,8 +18,6 @@ public enum PeerInfoPaneKey: Int32 { case gifs case groupsInCommon case recommended - case savedMessagesChats - case savedMessages } public struct PeerInfoStatusData: Equatable { diff --git a/submodules/TelegramUI/Sources/ChatSearchNavigationContentNode.swift b/submodules/TelegramUI/Sources/ChatSearchNavigationContentNode.swift index fdbd23678c..8ad90ba599 100644 --- a/submodules/TelegramUI/Sources/ChatSearchNavigationContentNode.swift +++ b/submodules/TelegramUI/Sources/ChatSearchNavigationContentNode.swift @@ -36,7 +36,11 @@ final class ChatSearchNavigationContentNode: NavigationBarContentNode { switch chatLocation { case .peer, .replyThread, .feed: if chatLocation.peerId == context.account.peerId, presentationInterfaceState.hasSearchTags { - placeholderText = strings.Chat_SearchTagsPlaceholder + if case .standard(.embedded(false)) = presentationInterfaceState.mode { + placeholderText = strings.Common_Search + } else { + placeholderText = strings.Chat_SearchTagsPlaceholder + } } else { placeholderText = strings.Conversation_SearchPlaceholder } @@ -114,7 +118,11 @@ final class ChatSearchNavigationContentNode: NavigationBarContentNode { if presentationInterfaceState.historyFilter != nil { placeholderText = self.strings.Common_Search } else if self.chatLocation.peerId == self.context.account.peerId, presentationInterfaceState.hasSearchTags { - placeholderText = self.strings.Chat_SearchTagsPlaceholder + if case .standard(.embedded(false)) = presentationInterfaceState.mode { + placeholderText = strings.Common_Search + } else { + placeholderText = self.strings.Chat_SearchTagsPlaceholder + } } else { placeholderText = self.strings.Conversation_SearchPlaceholder }