Hide bot in suggestions list

This commit is contained in:
Kylmakalle 2024-08-13 00:52:20 +03:00
parent 44fe90b317
commit f4d9e3325e

View File

@ -3519,7 +3519,14 @@ final class ChatListSearchListPaneNode: ASDisplayNode, ChatListSearchPaneNode {
var result: [ChatListRecentEntry] = []
var existingIds = Set<PeerId>()
// 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
}