mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-01 01:36:12 +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:
co-authored by
Claude Sonnet 4.6
parent
4a4ff76f10
commit
b50f21060c
@@ -1118,6 +1118,10 @@ public:
|
|||||||
return total;
|
return total;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void clearAllChannelUnread() {
|
||||||
|
memset(_ch_unread, 0, sizeof(_ch_unread));
|
||||||
|
}
|
||||||
|
|
||||||
void updateChannelUnread() {
|
void updateChannelUnread() {
|
||||||
if (_hist_sel < 0 || _sel_channel_idx < 0 || _sel_channel_idx >= MAX_GROUP_CHANNELS) return;
|
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;
|
if (_hist_sel > _viewing_max_seen) _viewing_max_seen = _hist_sel;
|
||||||
@@ -2626,6 +2630,7 @@ void UITask::msgRead(int msgcount) {
|
|||||||
if (msgcount == 0) {
|
if (msgcount == 0) {
|
||||||
_room_unread = 0;
|
_room_unread = 0;
|
||||||
memset(_dm_unread_table, 0, sizeof(_dm_unread_table));
|
memset(_dm_unread_table, 0, sizeof(_dm_unread_table));
|
||||||
|
((QuickMsgScreen*)quick_msg)->clearAllChannelUnread();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user