Minor fixes.
GitOrigin-RevId: a19b9f62c992d68f4fc11eaf2d73d56a320661f3
This commit is contained in:
parent
d1384cf9e4
commit
869a33541f
@ -17623,7 +17623,7 @@ MessagesManager::MessageNotificationGroup MessagesManager::get_message_notificat
|
|||||||
result.total_count = 0;
|
result.total_count = 0;
|
||||||
}
|
}
|
||||||
result.notifications = get_message_notifications_from_database(
|
result.notifications = get_message_notifications_from_database(
|
||||||
d, NotificationId::max(), td_->notification_manager_->get_max_notification_group_size());
|
d, NotificationId::max(), static_cast<int32>(td_->notification_manager_->get_max_notification_group_size()));
|
||||||
|
|
||||||
int32 last_notification_date = 0;
|
int32 last_notification_date = 0;
|
||||||
NotificationId last_notification_id;
|
NotificationId last_notification_id;
|
||||||
@ -17760,7 +17760,7 @@ void MessagesManager::do_remove_message_notification(DialogId dialog_id, Notific
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto m = on_get_message_from_database(dialog_id, d, std::move(result[0]));
|
auto m = on_get_message_from_database(dialog_id, d, std::move(result[0]));
|
||||||
if (is_message_has_active_notification(d, m)) {
|
if (m->notification_id == notification_id && is_message_has_active_notification(d, m)) {
|
||||||
remove_message_notification_id(d, m, false);
|
remove_message_notification_id(d, m, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -244,7 +244,7 @@ int32 NotificationManager::load_message_notification_groups_from_database(int32
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 NotificationManager::get_max_notification_group_size() const {
|
size_t NotificationManager::get_max_notification_group_size() const {
|
||||||
return max_notification_group_size_;
|
return max_notification_group_size_;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -273,7 +273,7 @@ NotificationGroupId NotificationManager::get_next_notification_group_id() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
NotificationGroupKey NotificationManager::get_last_updated_group_key() const {
|
NotificationGroupKey NotificationManager::get_last_updated_group_key() const {
|
||||||
int32 left = max_notification_group_count_;
|
size_t left = max_notification_group_count_;
|
||||||
auto it = groups_.begin();
|
auto it = groups_.begin();
|
||||||
while (it != groups_.end() && left > 1) {
|
while (it != groups_.end() && left > 1) {
|
||||||
++it;
|
++it;
|
||||||
@ -1355,7 +1355,7 @@ void NotificationManager::on_notification_group_size_max_changed() {
|
|||||||
flush_all_pending_notifications();
|
flush_all_pending_notifications();
|
||||||
flush_all_pending_updates(true, "on_notification_group_size_max_changed");
|
flush_all_pending_updates(true, "on_notification_group_size_max_changed");
|
||||||
|
|
||||||
int32 left = max_notification_group_count_;
|
size_t left = max_notification_group_count_;
|
||||||
for (auto it = groups_.begin(); it != groups_.end() && left > 0; ++it, left--) {
|
for (auto it = groups_.begin(); it != groups_.end() && left > 0; ++it, left--) {
|
||||||
auto &group_key = it->first;
|
auto &group_key = it->first;
|
||||||
auto &group = it->second;
|
auto &group = it->second;
|
||||||
|
@ -41,7 +41,7 @@ class NotificationManager : public Actor {
|
|||||||
|
|
||||||
NotificationManager(Td *td, ActorShared<> parent);
|
NotificationManager(Td *td, ActorShared<> parent);
|
||||||
|
|
||||||
int32 get_max_notification_group_size() const;
|
size_t get_max_notification_group_size() const;
|
||||||
|
|
||||||
NotificationId get_max_notification_id() const;
|
NotificationId get_max_notification_id() const;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user