mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 14:58:12 +00:00
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 <noreply@anthropic.com>
This commit is contained in:
@@ -865,16 +865,20 @@ public:
|
|||||||
if (_ctx_menu.active) {
|
if (_ctx_menu.active) {
|
||||||
auto res = _ctx_menu.handleInput(c);
|
auto res = _ctx_menu.handleInput(c);
|
||||||
if (res == PopupMenu::SELECTED) {
|
if (res == PopupMenu::SELECTED) {
|
||||||
|
int cleared = 0;
|
||||||
if (_mode_sel == 0) {
|
if (_mode_sel == 0) {
|
||||||
|
cleared = getDMUnreadTotal();
|
||||||
_task->clearAllDMUnread();
|
_task->clearAllDMUnread();
|
||||||
_task->showAlert("DMs marked read", 800);
|
|
||||||
} else if (_mode_sel == 1) {
|
} else if (_mode_sel == 1) {
|
||||||
|
cleared = _task->getChannelUnreadCount();
|
||||||
clearAllChannelUnread();
|
clearAllChannelUnread();
|
||||||
_task->showAlert("Channels marked read", 800);
|
|
||||||
} else {
|
} else {
|
||||||
|
cleared = _task->getRoomUnreadCount();
|
||||||
_task->clearRoomUnread();
|
_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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user