From f4d9e3325e6683e83f30da9999e1669fd5126800 Mon Sep 17 00:00:00 2001 From: Kylmakalle Date: Tue, 13 Aug 2024 00:52:20 +0300 Subject: [PATCH] Hide bot in suggestions list --- .../Sources/ChatListSearchListPaneNode.swift | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/submodules/ChatListUI/Sources/ChatListSearchListPaneNode.swift b/submodules/ChatListUI/Sources/ChatListSearchListPaneNode.swift index 5f4b035ec6..55c3f7d503 100644 --- a/submodules/ChatListUI/Sources/ChatListSearchListPaneNode.swift +++ b/submodules/ChatListUI/Sources/ChatListSearchListPaneNode.swift @@ -3519,7 +3519,14 @@ final class ChatListSearchListPaneNode: ASDisplayNode, ChatListSearchPaneNode { var result: [ChatListRecentEntry] = [] var existingIds = Set() + // MARK: Swiftgram + // Hidding SwiftgramBot from recents so it won't annoy people. Ideally we should call removeRecentlyUsedApp, so it won't annoy users in other apps + let skipId = 5846791198 + for id in localApps.peerIds { + if id.id._internalGetInt64Value() == skipId { + continue + } if existingIds.contains(id) { continue } @@ -3559,6 +3566,9 @@ final class ChatListSearchListPaneNode: ASDisplayNode, ChatListSearchPaneNode { } if let remoteApps { for appPeerId in remoteApps { + if appPeerId.id._internalGetInt64Value() == skipId { + continue + } if existingIds.contains(appPeerId) { continue }