From fec4828124884d83dea32a8f88c5142602618748 Mon Sep 17 00:00:00 2001 From: Jakub <106778416+MarekZegare4@users.noreply.github.com> Date: Tue, 9 Jun 2026 07:43:51 +0200 Subject: [PATCH] fix(QuickMsgScreen): show "N marked read" alert for per-contact and per-channel mark-as-read MODE_SELECT already showed the count; CONTACT_PICK ("Mark as read") and CHANNEL_PICK ("Mark all read") were silently clearing unread without any feedback. Count is read before zeroing so the alert is accurate. Co-Authored-By: Claude Sonnet 4.6 --- examples/companion_radio/ui-new/QuickMsgScreen.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/companion_radio/ui-new/QuickMsgScreen.h b/examples/companion_radio/ui-new/QuickMsgScreen.h index 32ca9dbe..046000b2 100644 --- a/examples/companion_radio/ui-new/QuickMsgScreen.h +++ b/examples/companion_radio/ui-new/QuickMsgScreen.h @@ -1197,7 +1197,11 @@ public: if (the_mesh.getContactByIdx(_sorted[_contact_sel], ci)) { int sel = _ctx_menu.selectedIndex(); if (sel == 0) { + int cleared = (int)_task->getDMUnread(ci.id.pub_key); _task->clearDMUnread(ci.id.pub_key); + char msg[32]; + snprintf(msg, sizeof(msg), "%d marked read", cleared); + _task->showAlert(msg, 800); } else if (sel == 3) { // Pin / Unpin int pinned_slot = _task->findFavouriteSlot(ci.id.pub_key); @@ -1327,7 +1331,11 @@ public: uint8_t ch_idx = _channel_indices[_channel_sel]; int sel = _ctx_menu.selectedIndex(); if (sel == 0) { + int cleared = (int)_ch_unread[ch_idx]; _ch_unread[ch_idx] = 0; + char msg[32]; + snprintf(msg, sizeof(msg), "%d marked read", cleared); + _task->showAlert(msg, 800); } // sel 1/2/3 already handled by LEFT/RIGHT; ENTER just closes. }