mirror of
https://github.com/crosspoint-reader/crosspoint-reader.git
synced 2026-04-29 10:26:52 -07:00
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**_
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user