Special handling for secret chats

This commit is contained in:
Ali
2020-03-06 18:36:33 +04:00
parent 1ddb57c98c
commit 5da230ace4

View File

@@ -268,10 +268,11 @@ public struct ChatListFilterPredicate {
}
func includes(peer: Peer, groupId: PeerGroupId, notificationSettings: PeerNotificationSettings?, isUnread: Bool, isContact: Bool) -> Bool {
if self.excludePeerIds.contains(peer.id) {
let includePeerId = peer.associatedPeerId ?? peer.id
if self.excludePeerIds.contains(includePeerId) {
return false
}
if self.includePeerIds.contains(peer.id) {
if self.includePeerIds.contains(includePeerId) {
return true
}
if groupId != .root {