Remove unnecessary filter category rule

This commit is contained in:
Ali 2020-03-24 18:26:24 +04:00
parent 727bf6223c
commit 8e95642d8f

View File

@ -742,9 +742,9 @@ enum ChatListFilterType {
case nonContacts case nonContacts
} }
func chatListFilterType(_ filter: ChatListFilter) -> ChatListFilterType { func chatListFilterType(postbox: Postbox, filter: ChatListFilter) -> ChatListFilterType {
let filterType: ChatListFilterType let filterType: ChatListFilterType
if filter.data.includePeers.peers.isEmpty {
if filter.data.categories == .all { if filter.data.categories == .all {
if filter.data.excludeRead { if filter.data.excludeRead {
filterType = .unread filterType = .unread
@ -768,9 +768,7 @@ func chatListFilterType(_ filter: ChatListFilter) -> ChatListFilterType {
filterType = .generic filterType = .generic
} }
} }
} else {
filterType = .generic
}
return filterType return filterType
} }