Simplify conditions in lambda.
This commit is contained in:
parent
1dcd78f1ed
commit
4b3750cefe
@ -2135,15 +2135,13 @@ void NotificationManager::remove_notification_group(NotificationGroupId group_id
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
remove_added_notifications_from_pending_updates(
|
remove_added_notifications_from_pending_updates(
|
||||||
group_id, [max_object_id](const td_api::object_ptr<td_api::notification> ¬ification) {
|
group_id, [max_id = max_object_id.get()](const td_api::object_ptr<td_api::notification> ¬ification) {
|
||||||
const auto *type = notification->type_.get();
|
const auto *type = notification->type_.get();
|
||||||
switch (type->get_id()) {
|
switch (type->get_id()) {
|
||||||
case td_api::notificationTypeNewMessage::ID:
|
case td_api::notificationTypeNewMessage::ID:
|
||||||
return static_cast<const td_api::notificationTypeNewMessage *>(type)->message_->id_ <=
|
return static_cast<const td_api::notificationTypeNewMessage *>(type)->message_->id_ <= max_id;
|
||||||
max_object_id.get();
|
|
||||||
case td_api::notificationTypeNewPushMessage::ID:
|
case td_api::notificationTypeNewPushMessage::ID:
|
||||||
return static_cast<const td_api::notificationTypeNewPushMessage *>(type)->message_id_ <=
|
return static_cast<const td_api::notificationTypeNewPushMessage *>(type)->message_id_ <= max_id;
|
||||||
max_object_id.get();
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user