Improve need_dialog_in_filter behavior.
GitOrigin-RevId: 56ccaa30c748e1ac4c5850185f0682c61556b17e
This commit is contained in:
parent
23df5601fe
commit
e046e2ced4
@ -31090,12 +31090,14 @@ bool MessagesManager::need_dialog_in_filter(const Dialog *d, const DialogFilter
|
||||
}
|
||||
}
|
||||
}
|
||||
if (d->unread_mention_count == 0 || is_dialog_mention_notifications_disabled(d)) {
|
||||
if (filter->exclude_muted && is_dialog_muted(d)) {
|
||||
return false;
|
||||
}
|
||||
if (filter->exclude_read && d->server_unread_count + d->local_unread_count == 0 && !d->is_marked_as_unread) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (filter->exclude_archived && d->folder_id == FolderId::archive()) {
|
||||
return false;
|
||||
}
|
||||
@ -31105,7 +31107,7 @@ bool MessagesManager::need_dialog_in_filter(const Dialog *d, const DialogFilter
|
||||
if (td_->contacts_manager_->is_user_bot(user_id)) {
|
||||
return filter->include_bots;
|
||||
}
|
||||
if (td_->contacts_manager_->is_user_contact(user_id)) {
|
||||
if (user_id == td_->contacts_manager_->get_my_id() || td_->contacts_manager_->is_user_contact(user_id)) {
|
||||
return filter->include_contacts;
|
||||
}
|
||||
return filter->include_non_contacts;
|
||||
|
Loading…
Reference in New Issue
Block a user