From ffc30eb18c11950c723230f146448ca83878ad17 Mon Sep 17 00:00:00 2001 From: Yaroslav Date: Thu, 22 Jan 2026 00:53:42 +0300 Subject: [PATCH] Fix unpressing while skipping delay block --- src/activities/reader/EpubReaderActivity.cpp | 8 ++++---- src/activities/reader/XtcReaderActivity.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/activities/reader/EpubReaderActivity.cpp b/src/activities/reader/EpubReaderActivity.cpp index 1673d7d5..045d6f76 100644 --- a/src/activities/reader/EpubReaderActivity.cpp +++ b/src/activities/reader/EpubReaderActivity.cpp @@ -191,10 +191,6 @@ void EpubReaderActivity::loop() { mappedInput.wasReleased(MappedInputManager::Button::Power)) || mappedInput.wasReleased(MappedInputManager::Button::Right); - if (delayedSkipPending) { - return; - } - if (!prevReleased && !nextReleased) { return; } @@ -205,6 +201,10 @@ void EpubReaderActivity::loop() { return; } + if (delayedSkipPending) { + return; + } + // any botton press when at end of the book goes back to the last page if (currentSpineIndex > 0 && currentSpineIndex >= epub->getSpineItemsCount()) { currentSpineIndex = epub->getSpineItemsCount() - 1; diff --git a/src/activities/reader/XtcReaderActivity.cpp b/src/activities/reader/XtcReaderActivity.cpp index d1c69601..a02aa3f0 100644 --- a/src/activities/reader/XtcReaderActivity.cpp +++ b/src/activities/reader/XtcReaderActivity.cpp @@ -140,10 +140,6 @@ void XtcReaderActivity::loop() { mappedInput.wasReleased(MappedInputManager::Button::Power)) || mappedInput.wasReleased(MappedInputManager::Button::Right); - if (delayedSkipPending) { - return; - } - if (!prevReleased && !nextReleased) { return; } @@ -154,6 +150,10 @@ void XtcReaderActivity::loop() { return; } + if (delayedSkipPending) { + return; + } + // Handle end of book if (currentPage >= xtc->getPageCount()) { currentPage = xtc->getPageCount() - 1;