From 3e4e85e1ff30f3c4953c8b06eba5ccea42bb1c85 Mon Sep 17 00:00:00 2001 From: Jakub <106778416+MarekZegare4@users.noreply.github.com> Date: Sun, 24 May 2026 22:46:54 +0200 Subject: [PATCH] feat(ui): show read-count in mark-all-read confirmation alert Sample the unread total for the active mode (DM/Channels/Rooms) before clearing, then alert "N marked read". Matches the original FEATURES.md design note. Co-Authored-By: Claude Sonnet 4.6 --- examples/companion_radio/ui-new/QuickMsgScreen.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/companion_radio/ui-new/QuickMsgScreen.h b/examples/companion_radio/ui-new/QuickMsgScreen.h index 4a0f0abc..a89b8cfd 100644 --- a/examples/companion_radio/ui-new/QuickMsgScreen.h +++ b/examples/companion_radio/ui-new/QuickMsgScreen.h @@ -865,16 +865,20 @@ public: if (_ctx_menu.active) { auto res = _ctx_menu.handleInput(c); if (res == PopupMenu::SELECTED) { + int cleared = 0; if (_mode_sel == 0) { + cleared = getDMUnreadTotal(); _task->clearAllDMUnread(); - _task->showAlert("DMs marked read", 800); } else if (_mode_sel == 1) { + cleared = _task->getChannelUnreadCount(); clearAllChannelUnread(); - _task->showAlert("Channels marked read", 800); } else { + cleared = _task->getRoomUnreadCount(); _task->clearRoomUnread(); - _task->showAlert("Rooms marked read", 800); } + char msg[32]; + snprintf(msg, sizeof(msg), "%d marked read", cleared); + _task->showAlert(msg, 800); } return true; }