From eec42c0dd3d2f3b824409a80f8acc8e8d0ebc95a Mon Sep 17 00:00:00 2001 From: jpirnay Date: Mon, 23 Mar 2026 21:28:21 +0100 Subject: [PATCH 1/3] Only on left --- src/activities/home/RecentBooksActivity.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/activities/home/RecentBooksActivity.cpp b/src/activities/home/RecentBooksActivity.cpp index 563e3bdf..07a2143e 100644 --- a/src/activities/home/RecentBooksActivity.cpp +++ b/src/activities/home/RecentBooksActivity.cpp @@ -58,8 +58,7 @@ void RecentBooksActivity::loop() { // Left button: remove selected book from recent list if (!recentBooks.empty() && selectorIndex < recentBooks.size() && - (mappedInput.wasReleased(MappedInputManager::Button::Left) || - mappedInput.wasReleased(MappedInputManager::Button::Up))) { + mappedInput.wasReleased(MappedInputManager::Button::Left)) { const std::string bookPath = recentBooks[selectorIndex].path; const std::string bookTitle = recentBooks[selectorIndex].title; From dc6074225c813c290d29ed9f13d58eea014f38d1 Mon Sep 17 00:00:00 2001 From: jpirnay Date: Mon, 23 Mar 2026 21:30:22 +0100 Subject: [PATCH 2/3] Use proper term --- lib/I18n/translations/english.yaml | 1 + src/activities/home/RecentBooksActivity.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/I18n/translations/english.yaml b/lib/I18n/translations/english.yaml index df91c1a1..77223c33 100644 --- a/lib/I18n/translations/english.yaml +++ b/lib/I18n/translations/english.yaml @@ -254,6 +254,7 @@ STR_GO_HOME_BUTTON: "Go Home" STR_SYNC_PROGRESS: "Sync Progress" STR_DELETE_CACHE: "Delete Book Cache" STR_DELETE: "Delete" +STR_REMOVE: "Remove" STR_DISPLAY_QR: "Show page as QR" STR_CHAPTER_PREFIX: "Chapter: " STR_PAGES_SEPARATOR: " pages | " diff --git a/src/activities/home/RecentBooksActivity.cpp b/src/activities/home/RecentBooksActivity.cpp index 07a2143e..e991f65a 100644 --- a/src/activities/home/RecentBooksActivity.cpp +++ b/src/activities/home/RecentBooksActivity.cpp @@ -78,7 +78,7 @@ void RecentBooksActivity::loop() { } }; - std::string heading = tr(STR_DELETE) + std::string("? "); + std::string heading = tr(STR_REMOVE) + std::string("? "); startActivityForResult(std::make_unique(renderer, mappedInput, heading, bookTitle), handler); return; } @@ -119,7 +119,7 @@ void RecentBooksActivity::render(RenderLock&&) { } // Help text - const auto labels = mappedInput.mapLabels(tr(STR_HOME), tr(STR_OPEN), tr(STR_DELETE), tr(STR_DIR_DOWN)); + const auto labels = mappedInput.mapLabels(tr(STR_HOME), tr(STR_OPEN), tr(STR_REMOVE), ""); GUI.drawButtonHints(renderer, labels.btn1, labels.btn2, labels.btn3, labels.btn4); renderer.displayBuffer(); From 7ad9d6cf140d868a03dcd10645a4ecaa3ca446b8 Mon Sep 17 00:00:00 2001 From: jpirnay Date: Mon, 23 Mar 2026 21:37:49 +0100 Subject: [PATCH 3/3] Hide buttons when empty --- src/activities/home/RecentBooksActivity.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/activities/home/RecentBooksActivity.cpp b/src/activities/home/RecentBooksActivity.cpp index e991f65a..ffbd8319 100644 --- a/src/activities/home/RecentBooksActivity.cpp +++ b/src/activities/home/RecentBooksActivity.cpp @@ -119,7 +119,9 @@ void RecentBooksActivity::render(RenderLock&&) { } // Help text - const auto labels = mappedInput.mapLabels(tr(STR_HOME), tr(STR_OPEN), tr(STR_REMOVE), ""); + const bool hasBooks = !recentBooks.empty(); + const auto labels = + mappedInput.mapLabels(tr(STR_HOME), hasBooks ? tr(STR_OPEN) : "", hasBooks ? tr(STR_REMOVE) : "", ""); GUI.drawButtonHints(renderer, labels.btn1, labels.btn2, labels.btn3, labels.btn4); renderer.displayBuffer();