fix(nearby): the ping popup scrolls to its last result row

The OLED popup fits 3 rows, a finished ping has 4; UP/DOWN were swallowed
so SNR back stayed hidden. Enter on any row sends. Fixes #50.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-10-16 15:38:26 +02:00
co-authored by Claude Opus 5.5
parent 9dbf4501a3
commit 0ea17f0414
@@ -530,10 +530,10 @@ class NearbyScreen : public UIScreen, protected NearbyModel {
if (pingRowCount() != _ping_menu.count()) rebuildPingMenu();
}
// Ping popup input. Result rows are read-only, so UP/DOWN are swallowed to keep
// the highlight on "Send".
// Ping popup input. UP/DOWN scroll: on the OLED the popup fits 3 rows, so a
// full result (Send + RTT + 2 SNR) needs scrolling to show the last one.
// Result rows are read-only, so Enter on any row sends.
void handlePingMenuInput(char c) {
if (c == KEY_UP || c == KEY_DOWN) return;
auto res = _ping_menu.handleInput(c);
if (res == PopupMenu::SELECTED) {
const Entry* e = selected();