Fixed ability to remove peer from chats filter to make it empty.

This commit is contained in:
23rd
2024-11-24 10:13:47 +03:00
parent b335981621
commit aa8d543ed8
3 changed files with 15 additions and 3 deletions
@@ -126,9 +126,7 @@ bool ChooseFilterValidator::canRemove(FilterId filterId) const {
const auto list = _history->owner().chatsFilters().list();
const auto i = ranges::find(list, filterId, &Data::ChatFilter::id);
if (i != end(list)) {
const auto &filter = *i;
return filter.contains(_history)
&& ((filter.always().size() > 1) || filter.flags());
return Data::CanRemoveFromChatFilter(*i, _history);
}
return false;
}