From 5c12f2f01ea744e5e453d5237e4e90244614202a Mon Sep 17 00:00:00 2001 From: Mraulio Date: Sat, 11 Apr 2026 19:28:00 +0200 Subject: [PATCH] fix: avoid skipping chapter after screenshot (#1625) ## Summary * **What is the goal of this PR?** Fixes skipping chapter when it's enabled in Settings and you take a Screenshot. * **What changes are included?** A simple return if Power and Down were released before the skipChapter. ## Additional Context * There is an Issue related #1595. * Checked that it kept the Power button funcionality for Next page and Suspend. --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**NO**_ --- src/activities/reader/EpubReaderActivity.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/activities/reader/EpubReaderActivity.cpp b/src/activities/reader/EpubReaderActivity.cpp index 65dbe17c8..f6d58bfc4 100644 --- a/src/activities/reader/EpubReaderActivity.cpp +++ b/src/activities/reader/EpubReaderActivity.cpp @@ -195,6 +195,11 @@ void EpubReaderActivity::loop() { const bool skipChapter = SETTINGS.longPressChapterSkip && mappedInput.getHeldTime() > skipChapterMs; + // Don't skip chapter after screenshot + if (gpio.wasReleased(HalGPIO::BTN_POWER) && gpio.wasReleased(HalGPIO::BTN_DOWN)) { + return; + } + if (skipChapter) { lastPageTurnTime = millis(); // We don't want to delete the section mid-render, so grab the semaphore