diff --git a/examples/companion_radio/main.cpp b/examples/companion_radio/main.cpp index 688135a..20feef3 100644 --- a/examples/companion_radio/main.cpp +++ b/examples/companion_radio/main.cpp @@ -924,7 +924,7 @@ void handleKeyboardInput() { if (key == 'r') { if (notes->startRename()) { composeNeedsRefresh = true; - lastComposeRefresh = millis(); + lastComposeRefresh = millis() - COMPOSE_REFRESH_INTERVAL; // Trigger on next loop iteration } return; } diff --git a/examples/companion_radio/ui-new/Notesscreen.h b/examples/companion_radio/ui-new/Notesscreen.h index d979bca..d2bced7 100644 --- a/examples/companion_radio/ui-new/Notesscreen.h +++ b/examples/companion_radio/ui-new/Notesscreen.h @@ -491,14 +491,19 @@ private: display.setColor(DisplayDriver::GREEN); display.print("Notes"); - // Show rename hint when a file (not "+ New Note") is selected + // Right side of header: [R:Rename] [count] + snprintf(tmp, sizeof(tmp), "[%d]", (int)_fileList.size()); + int rightX = display.width() - display.getTextWidth(tmp) - 2; + if (_selectedFile >= 1 && _selectedFile <= (int)_fileList.size()) { + const char* hint = "[R:Rename]"; + int hintX = rightX - display.getTextWidth(hint) - 4; + display.setCursor(hintX, 0); display.setColor(DisplayDriver::YELLOW); - display.print(" R:Rename"); + display.print(hint); } - snprintf(tmp, sizeof(tmp), "[%d]", (int)_fileList.size()); - display.setCursor(display.width() - display.getTextWidth(tmp) - 2, 0); + display.setCursor(rightX, 0); display.setColor(DisplayDriver::GREEN); display.print(tmp);