mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Fix assertion violation in marking history as read.
This commit is contained in:
@@ -1553,7 +1553,9 @@ void History::readClientSideMessages() {
|
||||
|
||||
MsgId History::readInbox() {
|
||||
const auto upTo = msgIdForRead();
|
||||
setUnreadCount(0);
|
||||
if (unreadCountKnown()) {
|
||||
setUnreadCount(0);
|
||||
}
|
||||
readClientSideMessages();
|
||||
if (upTo) {
|
||||
inboxRead(upTo);
|
||||
@@ -3022,7 +3024,9 @@ void History::clear(ClearType type) {
|
||||
} else {
|
||||
_notifications.clear();
|
||||
owner().notifyHistoryCleared(this);
|
||||
setUnreadCount(0);
|
||||
if (unreadCountKnown()) {
|
||||
setUnreadCount(0);
|
||||
}
|
||||
if (type == ClearType::DeleteChat) {
|
||||
setLastMessage(nullptr);
|
||||
} else if (_lastMessage && *_lastMessage) {
|
||||
|
Reference in New Issue
Block a user