Remove unnecessary logging.
GitOrigin-RevId: 33419021cffedb85336c51b3d1f783ceeac9f415
This commit is contained in:
parent
3f6485fb39
commit
4334f5e63a
@ -9562,16 +9562,19 @@ void ContactsManager::on_delete_profile_photo(int64 profile_photo_id, Promise<Un
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ContactsManager::drop_user_photos(UserId user_id, bool is_empty, const char *source) {
|
void ContactsManager::drop_user_photos(UserId user_id, bool is_empty, const char *source) {
|
||||||
LOG(INFO) << "Drop photos of " << user_id << " to " << (is_empty ? "empty" : "unknown") << " from " << source;
|
|
||||||
auto it = user_photos_.find(user_id);
|
auto it = user_photos_.find(user_id);
|
||||||
if (it != user_photos_.end()) {
|
if (it != user_photos_.end()) {
|
||||||
auto user_photos = &it->second;
|
auto user_photos = &it->second;
|
||||||
user_photos->photos.clear();
|
int32 new_count = is_empty ? 0 : -1;
|
||||||
if (is_empty) {
|
if (user_photos->count == new_count) {
|
||||||
user_photos->count = 0;
|
CHECK(user_photos->photos.empty());
|
||||||
} else {
|
CHECK(user_photos->offset == user_photos->count);
|
||||||
user_photos->count = -1;
|
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;
|
user_photos->offset = user_photos->count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user