Fix issue where pressing back from chapter select would leave book (#137)

## Summary

* Fix issue where pressing back from chapter select would leave book
* Rely on `wasReleased` checks instead
This commit is contained in:
Dave Allie 2025-12-28 16:06:18 +10:00 committed by GitHub
parent eabd149371
commit 9023b262a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -57,9 +57,9 @@ void EpubReaderChapterSelectionActivity::loop() {
const bool skipPage = inputManager.getHeldTime() > SKIP_PAGE_MS; const bool skipPage = inputManager.getHeldTime() > SKIP_PAGE_MS;
if (inputManager.wasPressed(InputManager::BTN_CONFIRM)) { if (inputManager.wasReleased(InputManager::BTN_CONFIRM)) {
onSelectSpineIndex(selectorIndex); onSelectSpineIndex(selectorIndex);
} else if (inputManager.wasPressed(InputManager::BTN_BACK)) { } else if (inputManager.wasReleased(InputManager::BTN_BACK)) {
onGoBack(); onGoBack();
} else if (prevReleased) { } else if (prevReleased) {
if (skipPage) { if (skipPage) {