mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 23:08:11 +00:00
fix: clear DM and channel unread counters on app sync completion
When companion app finishes syncing all messages (msgRead(0)), clear both _dm_unread_table and _ch_unread so indicators match the app's read state. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1118,6 +1118,10 @@ public:
|
||||
return total;
|
||||
}
|
||||
|
||||
void clearAllChannelUnread() {
|
||||
memset(_ch_unread, 0, sizeof(_ch_unread));
|
||||
}
|
||||
|
||||
void updateChannelUnread() {
|
||||
if (_hist_sel < 0 || _sel_channel_idx < 0 || _sel_channel_idx >= MAX_GROUP_CHANNELS) return;
|
||||
if (_hist_sel > _viewing_max_seen) _viewing_max_seen = _hist_sel;
|
||||
@@ -2626,6 +2630,7 @@ void UITask::msgRead(int msgcount) {
|
||||
if (msgcount == 0) {
|
||||
_room_unread = 0;
|
||||
memset(_dm_unread_table, 0, sizeof(_dm_unread_table));
|
||||
((QuickMsgScreen*)quick_msg)->clearAllChannelUnread();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user