From 36a545bc08e41791eb05ddc3af70496a4d5c5eef Mon Sep 17 00:00:00 2001 From: levlam Date: Wed, 5 Dec 2018 18:46:08 +0300 Subject: [PATCH] Fix unread_message_total_count_. GitOrigin-RevId: cd9daa5eb501ae2cc7c62d62a1be5751b68db4e5 --- td/telegram/MessagesManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 4bbe6a4c..9c8c9a57 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -18186,14 +18186,14 @@ void MessagesManager::send_update_unread_message_count(DialogId dialog_id, bool if (!td_->auth_manager_->is_bot() && G()->parameters().use_message_db) { CHECK(is_message_unread_count_inited_); if (unread_message_muted_count_ < 0 || unread_message_muted_count_ > unread_message_total_count_) { - LOG(ERROR) << "Unread messafe count became invalid: " << unread_message_total_count_ << '/' + LOG(ERROR) << "Unread message count became invalid: " << unread_message_total_count_ << '/' << unread_message_total_count_ - unread_message_muted_count_ << " from " << source << " and " << dialog_id; if (unread_message_muted_count_ < 0) { unread_message_muted_count_ = 0; } if (unread_message_muted_count_ > unread_message_total_count_) { - unread_message_muted_count_ = unread_message_total_count_; + unread_message_total_count_ = unread_message_muted_count_; } } G()->td_db()->get_binlog_pmc()->set("unread_message_count",