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:
@@ -172,8 +172,7 @@ void ShowAddParticipantsError(
|
||||
return;
|
||||
}
|
||||
}
|
||||
const auto bot = ranges::find_if(users, &UserData::isBot);
|
||||
const auto hasBot = (bot != end(users));
|
||||
const auto hasBot = ranges::any_of(users, &UserData::isBot);
|
||||
const auto text = [&] {
|
||||
if (error == qstr("USER_BOT")) {
|
||||
return tr::lng_cant_invite_bot_to_channel(tr::now);
|
||||
|
Reference in New Issue
Block a user