mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Fix reading of client side unread messages.
This commit is contained in:
@@ -1540,9 +1540,21 @@ void History::calculateFirstUnreadMessage() {
|
||||
}
|
||||
}
|
||||
|
||||
void History::readClientSideMessages() {
|
||||
for (const auto &block : blocks) {
|
||||
for (const auto &view : block->messages) {
|
||||
const auto item = view->data();
|
||||
if (!item->out()) {
|
||||
item->markClientSideAsRead();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MsgId History::readInbox() {
|
||||
const auto upTo = msgIdForRead();
|
||||
setUnreadCount(0);
|
||||
readClientSideMessages();
|
||||
if (upTo) {
|
||||
inboxRead(upTo);
|
||||
}
|
||||
|
Reference in New Issue
Block a user