2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Fix assertion violation in marking history as read.

This commit is contained in:
John Preston
2019-05-01 16:43:16 +04:00
parent d9ad3a4bbe
commit 4e8c57a861
2 changed files with 11 additions and 2 deletions

View File

@@ -6001,6 +6001,11 @@ void ApiWrap::sendReadRequest(not_null<PeerData*> peer, MsgId upTo) {
_readRequests.remove(peer);
if (const auto next = _readRequestsPending.take(peer)) {
sendReadRequest(peer, *next);
} else if (const auto history
= _session->data().historyLoaded(peer)) {
if (!history->unreadCountKnown()) {
requestDialogEntry(history);
}
}
};
if (const auto channel = peer->asChannel()) {