Adjust navigation at end of book to home page on forward press

(cherry picked from commit deb6ff3b9d1a284594540513f19a3191936915c9)
This commit is contained in:
nscheung
2026-03-25 20:16:47 +01:00
committed by jpirnay
parent 6be2627b59
commit d8334e9fa4
3 changed files with 23 additions and 10 deletions
+8 -4
View File
@@ -205,11 +205,15 @@ void EpubReaderActivity::loop() {
return;
}
// any botton press when at end of the book goes back to the last page
// At end of the book, forward button goes home and back button returns to last page
if (currentSpineIndex > 0 && currentSpineIndex >= epub->getSpineItemsCount()) {
currentSpineIndex = epub->getSpineItemsCount() - 1;
nextPageNumber = UINT16_MAX;
requestUpdate();
if (nextTriggered) {
onGoHome();
} else {
currentSpineIndex = epub->getSpineItemsCount() - 1;
nextPageNumber = UINT16_MAX;
requestUpdate();
}
return;
}