From 6c83eddbf3feeb375cef20fe702f7c99e5d38703 Mon Sep 17 00:00:00 2001 From: Uri Tauber Date: Mon, 14 Sep 2026 23:48:12 +0300 Subject: [PATCH] fix: warp lists in library (#3556) ## Summary Pressing _up_ when standing on the first title in library should jump to the last title - not go up to tabs bar. Currently, there isnt a way to get to the end of the list without scrolling all the items, since _up_ in tabs bar opens _search_. Granted, its not terrible since the user can reverse the list order, but still. Riding along another small UX change: move Text Settings in legacy reader menu to end of the list - making it more accessible than before - just one press up. --- src/activities/library/LibraryListActivity.cpp | 11 ++++++----- src/activities/reader/EpubReaderMenuActivity.cpp | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/activities/library/LibraryListActivity.cpp b/src/activities/library/LibraryListActivity.cpp index 03f0de9..f5f3d93 100644 --- a/src/activities/library/LibraryListActivity.cpp +++ b/src/activities/library/LibraryListActivity.cpp @@ -675,14 +675,15 @@ bool LibraryListActivity::handleButtons() { void LibraryListActivity::navigateButtons() { const int count = listCount(); - const int ringSize = count + 1; auto& nav = activeNav(); - buttonNavigator.onNextRelease([this, ringSize] { moveRingTo(ButtonNavigator::nextIndex(ringPos(), ringSize)); }); - buttonNavigator.onPreviousRelease([this, ringSize] { + buttonNavigator.onNextRelease([this, count] { + if (count > 0) moveRingTo(ringPos() == count ? 1 : ringPos() + 1); + }); + buttonNavigator.onPreviousRelease([this, count] { if (tabsFocused() && !degraded) { openSearch(); - } else { - moveRingTo(ButtonNavigator::previousIndex(ringPos(), ringSize)); + } else if (count > 0) { + moveRingTo(ringPos() <= 1 ? count : ringPos() - 1); } }); // A held button steps tabs while the strip has focus (the base behaviour diff --git a/src/activities/reader/EpubReaderMenuActivity.cpp b/src/activities/reader/EpubReaderMenuActivity.cpp index c3bf717..613808c 100644 --- a/src/activities/reader/EpubReaderMenuActivity.cpp +++ b/src/activities/reader/EpubReaderMenuActivity.cpp @@ -48,7 +48,6 @@ void EpubReaderMenuActivity::buildMenuItems(std::vector& items, bool h items.push_back({MenuAction::BOOKMARKS, StrId::STR_BOOKMARKS}); } items.push_back({MenuAction::TOGGLE_BOOKMARK, StrId::STR_TOGGLE_BOOKMARK}); - items.push_back({MenuAction::TEXT_SETTINGS, StrId::STR_TEXT_SETTINGS}); items.push_back({MenuAction::NIGHT_MODE, StrId::STR_NIGHT_MODE}); if (Frontlight.present()) { items.push_back({MenuAction::FRONTLIGHT, StrId::STR_FRONTLIGHT}); @@ -62,6 +61,7 @@ void EpubReaderMenuActivity::buildMenuItems(std::vector& items, bool h items.push_back({MenuAction::GO_HOME, StrId::STR_GO_HOME_BUTTON}); items.push_back({MenuAction::SYNC, StrId::STR_SYNC_PROGRESS}); items.push_back({MenuAction::DELETE_CACHE, StrId::STR_DELETE_CACHE}); + items.push_back({MenuAction::TEXT_SETTINGS, StrId::STR_TEXT_SETTINGS}); } void EpubReaderMenuActivity::closeCancelled() { -- 2.54.0