From d1384cf9e47cd64046fdbdaff2f59a440db0c4d1 Mon Sep 17 00:00:00 2001 From: levlam Date: Mon, 3 Dec 2018 00:41:07 +0300 Subject: [PATCH] Load more notification groups if needed on changed max_notification_group_count. GitOrigin-RevId: 3c4095905bef8d9d3e0faf5ef131d2b5068aadc2 --- td/telegram/NotificationManager.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/td/telegram/NotificationManager.cpp b/td/telegram/NotificationManager.cpp index 046031dcf..4f1e76a96 100644 --- a/td/telegram/NotificationManager.cpp +++ b/td/telegram/NotificationManager.cpp @@ -1327,11 +1327,10 @@ void NotificationManager::on_notification_group_count_max_changed() { } max_notification_group_count_ = new_max_notification_group_count_size_t; - /* - if (is_increased && last_loaded_group_key_ < get_last_updated_group_key()) { - TODO load_notification_groups_from_database(); + if (is_increased && last_loaded_notification_group_key_ < get_last_updated_group_key()) { + load_message_notification_groups_from_database( + td::max(new_max_notification_group_count, DEFAULT_GROUP_COUNT_MAX / 2), true); } - */ } void NotificationManager::on_notification_group_size_max_changed() {