mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-01 02:11:57 +00:00
feat(ui): drop echo toasts for actions the screen already shows
L1: Counters reset, Trail reset, Contact added/deleted, Logged in (admin), Logged out, Channel deleted, Share target / Bot channel / Bot room set, PIN set/cleared, Preset saved/deleted, and Unpinned on the favourites grid. L2: Channel deleted, Counters reset, Region/Preset/Scope/Waypoint deleted, Target cleared, Trail cleared, Message history deleted, Contact added/deleted. Failures and Unpinned where the item leaves the screen stay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -145,7 +145,6 @@ void UITask::channelAction(uint8_t act) {
|
||||
if (!tapConfirmed(s_del_lbl, "Delete?")) break;
|
||||
chanctl::remove(idx);
|
||||
navClosePopup();
|
||||
showToast("Channel deleted");
|
||||
showChats();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -383,5 +383,4 @@ void UITask::diagReset() {
|
||||
diag::resetCounters();
|
||||
navClosePopup();
|
||||
refreshDiag();
|
||||
showToast("Counters reset");
|
||||
}
|
||||
|
||||
@@ -91,7 +91,6 @@ void UITask::mapRegionAction(uint8_t act) {
|
||||
mapview::labels::flush();
|
||||
mapview::s_cache.invalidate();
|
||||
mapRegionsPopup();
|
||||
showToast("Region deleted");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -540,7 +540,6 @@ void UITask::navPick(int code) {
|
||||
if (navmap::s_tb.active()) { navmap::s_tb.stop(); showToast("Track back stopped"); break; }
|
||||
_core->locator.clearTarget();
|
||||
prefsSave();
|
||||
showToast("Target cleared");
|
||||
break;
|
||||
case navmap::T_WAYPOINT: {
|
||||
if (idx >= _core->waypoints.count()) return;
|
||||
@@ -734,7 +733,6 @@ void UITask::navWaypointAction(uint8_t act) {
|
||||
if (!tapConfirmed(_nav_del_lbl, "Delete?")) break;
|
||||
_core->waypoints.remove(i);
|
||||
navClosePopup();
|
||||
showToast("Waypoint deleted");
|
||||
rebuildMapMarkers();
|
||||
layoutMap();
|
||||
refreshNavBar();
|
||||
@@ -1332,7 +1330,6 @@ void UITask::navToolAction(uint8_t act) {
|
||||
case navmap::TL_TRAIL_RESET:
|
||||
if (!tapConfirmed(_nav_reset_lbl, "Reset?")) return;
|
||||
tr.reset();
|
||||
showToast("Trail cleared");
|
||||
rebuildMapMarkers();
|
||||
layoutMap();
|
||||
break;
|
||||
|
||||
@@ -99,7 +99,6 @@ void UITask::presetAction(uint8_t act) {
|
||||
prefsSave();
|
||||
navClosePopup();
|
||||
rebuildRadio();
|
||||
showToast("Preset deleted");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -217,7 +216,6 @@ void UITask::scopeAction(uint8_t act) {
|
||||
if (s_scope > 0) the_mesh.removeScope((uint8_t)s_scope);
|
||||
navClosePopup();
|
||||
buildScopes();
|
||||
showToast("Scope deleted");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -355,7 +355,6 @@ void UITask::storageClearHistory() {
|
||||
s_archive.clearAll();
|
||||
_core->history.clearAll();
|
||||
_core->markAllRead();
|
||||
showToast("Message history deleted");
|
||||
startWalk();
|
||||
}
|
||||
|
||||
|
||||
@@ -3787,7 +3787,6 @@ void UITask::nodeAction(uint8_t action) {
|
||||
break;
|
||||
case NODE_ADD:
|
||||
if (the_mesh.addDiscoveredContact(e.pub_key, e.name, e.type)) {
|
||||
showToast("Contact added");
|
||||
_screen = SCR_NEARBY;
|
||||
buildNearby();
|
||||
} else {
|
||||
@@ -3826,7 +3825,6 @@ void UITask::nodeAction(uint8_t action) {
|
||||
break;
|
||||
}
|
||||
if (the_mesh.deleteContactByKey(e.pub_key)) {
|
||||
showToast("Contact deleted");
|
||||
_screen = SCR_NEARBY;
|
||||
buildNearby();
|
||||
}
|
||||
|
||||
@@ -140,7 +140,6 @@ public:
|
||||
case AdminSession::LOGGED_IN:
|
||||
_tab = admin::TAB_SYSTEM;
|
||||
_row_sel = _row_scroll = 0;
|
||||
_task->showAlert("Logged in (admin)", 1000);
|
||||
break;
|
||||
case AdminSession::NOT_ADMIN: _task->showAlert("Not admin on this node", 1600); returnToOrigin(); break;
|
||||
case AdminSession::LOGIN_FAILED: _task->showAlert("Login failed", 1400); returnToOrigin(); break;
|
||||
|
||||
@@ -1043,7 +1043,6 @@ public:
|
||||
the_mesh.savePrefs();
|
||||
}
|
||||
_pick_target = false;
|
||||
_task->showAlert("Share target set", 1200);
|
||||
_task->gotoLiveShareScreen();
|
||||
}
|
||||
|
||||
@@ -1086,7 +1085,6 @@ public:
|
||||
the_mesh.savePrefs();
|
||||
}
|
||||
_pick_bot_channel = false;
|
||||
_task->showAlert("Bot channel set", 1200);
|
||||
_task->gotoBotScreen();
|
||||
}
|
||||
|
||||
@@ -1112,7 +1110,6 @@ public:
|
||||
}
|
||||
_pick_bot_room = false;
|
||||
_room_mode = false;
|
||||
_task->showAlert("Bot room set", 1200);
|
||||
_task->gotoBotScreen();
|
||||
}
|
||||
|
||||
@@ -1130,7 +1127,6 @@ public:
|
||||
the_mesh.savePrefs();
|
||||
}
|
||||
_pick_target = false;
|
||||
_task->showAlert("Share target set", 1200);
|
||||
_task->gotoLiveShareScreen();
|
||||
}
|
||||
|
||||
@@ -1961,7 +1957,6 @@ public:
|
||||
} else if (sel != _ctx_fav_idx) {
|
||||
// Logout: only reachable when isRoomLoggedIn() added this item.
|
||||
_task->core().rooms.logout(_sel_contact.id.pub_key);
|
||||
_task->showAlert("Logged out", 1000);
|
||||
}
|
||||
// Fav is a value row -- Enter never selects it (see cycleRoomCtxValue).
|
||||
}
|
||||
@@ -2132,7 +2127,6 @@ public:
|
||||
// Delete/Cancel sub-menu, defaults to Cancel (see where it's opened).
|
||||
if (res == PopupMenu::SELECTED && _ctx_menu.selectedIndex() == 0) { // "Delete"
|
||||
chanctl::remove(_ctx_ch_idx);
|
||||
_task->showAlert("Channel deleted", 1000);
|
||||
}
|
||||
if (res != PopupMenu::NONE) {
|
||||
_ch_delete_confirm_active = false;
|
||||
|
||||
@@ -194,7 +194,6 @@ class NearbyScreen : public UIScreen, protected NearbyModel {
|
||||
uint8_t key[PUB_KEY_SIZE];
|
||||
memcpy(key, e->pub_key, PUB_KEY_SIZE);
|
||||
if (the_mesh.deleteContactByKey(key)) {
|
||||
_task->showAlert("Contact deleted", 1200);
|
||||
_detail = false; // the node this detail/nav view showed is gone
|
||||
_nav = false;
|
||||
refresh();
|
||||
@@ -404,7 +403,6 @@ class NearbyScreen : public UIScreen, protected NearbyModel {
|
||||
const Entry* e = selected();
|
||||
if (e && e->has_key) {
|
||||
if (the_mesh.addDiscoveredContact(e->pub_key, e->name, e->type)) {
|
||||
_task->showAlert("Contact added", 1200);
|
||||
refresh(); // now a known contact — re-sort / re-mark this pass
|
||||
} else {
|
||||
_task->showAlert("Contacts full", 1200);
|
||||
|
||||
@@ -182,7 +182,6 @@ public:
|
||||
if (res == KeyboardWidget::DONE) {
|
||||
if (_picker.save(p, _task->keyboard().buf, rptTarget(p))) {
|
||||
_dirty = true;
|
||||
_task->showAlert("Preset saved", 800);
|
||||
}
|
||||
_picker.saving = false;
|
||||
} else if (res == KeyboardWidget::CANCELLED) {
|
||||
@@ -224,7 +223,6 @@ public:
|
||||
break;
|
||||
case RadioPresetPicker::DELETED:
|
||||
_dirty = true;
|
||||
_task->showAlert("Preset deleted", 800);
|
||||
break;
|
||||
case RadioPresetPicker::NONE:
|
||||
break;
|
||||
|
||||
@@ -746,7 +746,6 @@ public:
|
||||
}
|
||||
_edit_lock_pass = false;
|
||||
_lock_pass_first[0] = '\0';
|
||||
_task->showAlert("PIN set", 900);
|
||||
}
|
||||
} else if (res == KeyboardWidget::CANCELLED) {
|
||||
_edit_lock_pass = false;
|
||||
@@ -837,7 +836,6 @@ public:
|
||||
if (res == KeyboardWidget::DONE) {
|
||||
if (p && _picker.save(p, _kb->buf, radioTarget(p))) {
|
||||
_dirty = true;
|
||||
_task->showAlert("Preset saved", 800);
|
||||
}
|
||||
_picker.saving = false;
|
||||
} else if (res == KeyboardWidget::CANCELLED) {
|
||||
@@ -862,7 +860,6 @@ public:
|
||||
break;
|
||||
case RadioPresetPicker::DELETED:
|
||||
_dirty = true;
|
||||
_task->showAlert("Preset deleted", 800);
|
||||
break;
|
||||
case RadioPresetPicker::NONE:
|
||||
break;
|
||||
@@ -981,7 +978,6 @@ public:
|
||||
if (_task->passwordLockEnabled()) {
|
||||
_task->setNodeLockPassword("");
|
||||
the_mesh.savePrefs();
|
||||
_task->showAlert("PIN cleared", 900);
|
||||
} else {
|
||||
_edit_lock_pass = true;
|
||||
_lock_pass_first[0] = '\0';
|
||||
|
||||
@@ -384,7 +384,6 @@ public:
|
||||
if (res == PopupMenu::SELECTED && _reset_menu.selectedIndex() == 0) {
|
||||
diag::resetCounters();
|
||||
_last_rx = 0;
|
||||
_task->showAlert("Counters reset", 800);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -271,7 +271,6 @@ private:
|
||||
}
|
||||
void handleReset() {
|
||||
_task->core().trail.reset();
|
||||
_task->showAlert("Trail reset", 800);
|
||||
}
|
||||
void handleSave() {
|
||||
TrailEngine::FileResult r = _task->core().trail.save();
|
||||
|
||||
@@ -1553,9 +1553,6 @@ public:
|
||||
}
|
||||
_task->clearFavouriteSlot(_pin_target_slot);
|
||||
the_mesh.savePrefs();
|
||||
char alert[24];
|
||||
snprintf(alert, sizeof(alert), "Unpinned (slot %d)", _pin_target_slot + 1);
|
||||
_task->showAlert(alert, 800);
|
||||
}
|
||||
if (res != PopupMenu::NONE) _pin_target_slot = -1;
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user