From 4334f5e63a3800adb325b48610695ca7fbcf3b29 Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 7 Apr 2020 02:41:46 +0300 Subject: [PATCH] Remove unnecessary logging. GitOrigin-RevId: 33419021cffedb85336c51b3d1f783ceeac9f415 --- td/telegram/ContactsManager.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/td/telegram/ContactsManager.cpp b/td/telegram/ContactsManager.cpp index 0cfb4fe1c..6ff68f031 100644 --- a/td/telegram/ContactsManager.cpp +++ b/td/telegram/ContactsManager.cpp @@ -9562,16 +9562,19 @@ void ContactsManager::on_delete_profile_photo(int64 profile_photo_id, Promisesecond; - user_photos->photos.clear(); - if (is_empty) { - user_photos->count = 0; - } else { - user_photos->count = -1; + int32 new_count = is_empty ? 0 : -1; + if (user_photos->count == new_count) { + CHECK(user_photos->photos.empty()); + CHECK(user_photos->offset == user_photos->count); + return; } + + LOG(INFO) << "Drop photos of " << user_id << " to " << (is_empty ? "empty" : "unknown") << " from " << source; + user_photos->photos.clear(); + user_photos->count = new_count; user_photos->offset = user_photos->count; } }