From 9be2629d247780f985e631fcaa700819ccb9f299 Mon Sep 17 00:00:00 2001 From: levlam Date: Wed, 19 Feb 2020 04:02:56 +0300 Subject: [PATCH] Update unread_count id last_read_inbox_message_id is not changed. GitOrigin-RevId: 0c0d82d21ab4401748dddecd26f5a2e544a410a7 --- td/telegram/MessagesManager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index de03eefff..67b8ea70e 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -9519,6 +9519,10 @@ void MessagesManager::read_history_inbox(DialogId dialog_id, MessageId max_messa if (d->is_last_read_inbox_message_id_inited && max_message_id <= d->last_read_inbox_message_id) { LOG(INFO) << "Receive read inbox update in " << dialog_id << " up to " << max_message_id << " from " << source << ", but all messages have already been read up to " << d->last_read_inbox_message_id; + if (max_message_id == d->last_read_inbox_message_id && unread_count >= 0 && + unread_count != d->server_unread_count) { + set_dialog_last_read_inbox_message_id(d, MessageId::min(), unread_count, d->local_unread_count, true, source); + } return; }