mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Simplified ranges::find_if with ranges::any_of and ranges::none_of.
This commit is contained in:
@@ -416,7 +416,7 @@ QString PeerData::computeUnavailableReason() const {
|
||||
auto &&filtered = ranges::view::all(
|
||||
list
|
||||
) | ranges::view::filter([&](const Data::UnavailableReason &reason) {
|
||||
return ranges::find(skip, reason.reason) == end(skip);
|
||||
return !ranges::contains(skip, reason.reason);
|
||||
});
|
||||
const auto first = filtered.begin();
|
||||
return (first != filtered.end()) ? first->text : QString();
|
||||
|
Reference in New Issue
Block a user