From 85e64fc3b976a14767a524757b83bd855dfc3dda Mon Sep 17 00:00:00 2001 From: levlam Date: Sat, 22 Oct 2022 01:04:29 +0300 Subject: [PATCH] Fix cleaning of being loaded imported contacts. --- td/telegram/ContactsManager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/td/telegram/ContactsManager.cpp b/td/telegram/ContactsManager.cpp index d295577b8..04de07b1e 100644 --- a/td/telegram/ContactsManager.cpp +++ b/td/telegram/ContactsManager.cpp @@ -5932,11 +5932,11 @@ void ContactsManager::on_update_contacts_reset() { G()->td_db()->get_sqlite_pmc()->erase("user_imported_contacts", Auto()); } if (!are_imported_contacts_loaded_) { - CHECK(all_imported_contacts_.empty()); if (load_imported_contacts_queries_.empty()) { + CHECK(all_imported_contacts_.empty()); LOG(INFO) << "Imported contacts was never loaded, just clear them"; } else { - LOG(INFO) << "Imported contacts are being loaded, clear them also when they will be loaded"; + LOG(INFO) << "Imported contacts are being loaded, clear them after they will be loaded"; need_clear_imported_contacts_ = true; } } else { @@ -5944,7 +5944,7 @@ void ContactsManager::on_update_contacts_reset() { LOG(INFO) << "Imported contacts was loaded, but aren't changing now, just clear them"; all_imported_contacts_.clear(); } else { - LOG(INFO) << "Imported contacts are changing now, clear them also after they will be loaded"; + LOG(INFO) << "Imported contacts are changing now, clear them after they will be changed"; need_clear_imported_contacts_ = true; } }