mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 14:58:12 +00:00
fix(ui/favourites): DM unread badge cleared by companion app sync
msgRead(0) was called when the companion app read the last message from the offline queue, and it erased the entire _dm_unread_table. This wiped Favourites Dial badges the moment the app synced — leaving a 3-second window (the alert duration) where the badge was faintly visible behind the incoming-message popup, then gone. _dm_unread_table tracks per-contact UI state (Favourites Dial badges, contact list counters). It should only be cleared by user action: clearDMUnread (opens a DM) or clearAllDMUnread (mark-all-read). It has no relationship to the offline queue drain state. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1344,7 +1344,9 @@ void UITask::msgRead(int msgcount) {
|
||||
_msgcount = msgcount;
|
||||
if (msgcount == 0) {
|
||||
_room_unread = 0;
|
||||
memset(_dm_unread_table, 0, sizeof(_dm_unread_table));
|
||||
// Do NOT clear _dm_unread_table here — it tracks per-contact UI badges
|
||||
// independently of the offline queue. Badges are cleared only when the
|
||||
// user opens the DM (clearDMUnread) or explicitly marks all read.
|
||||
((QuickMsgScreen*)quick_msg)->clearAllChannelUnread();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user