mirror of
https://github.com/ratspeak/ratdeck.git
synced 2026-10-23 17:52:25 +00:00
Fix stale unread badge when message arrives during active conversation
refreshUI() detected and displayed new messages but never called markRead() or updated the tab badge. Now marks conversation as read and refreshes the badge whenever new messages are loaded while the user is actively viewing the conversation.
This commit is contained in:
1 parent
31ce457192
commit
4086609054
1 file changed
+3
@@ -161,6 +161,9 @@ void LvMessageView::refreshUI() {
|
||||
_cachedMsgs = std::move(newMsgs);
|
||||
_lastMsgCount = (int)_cachedMsgs.size();
|
||||
rebuildMessages();
|
||||
// Mark as read since user is actively viewing this conversation
|
||||
_lxmf->markRead(_peerHex);
|
||||
if (_ui) _ui->lvTabBar().setUnreadCount(LvTabBar::TAB_MSGS, _lxmf->unreadCount());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user