mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Fixed ability to remove peer from chats filter to make it empty.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user