From 422cad7bc50f222e708aacad339b41e0f6dc257f Mon Sep 17 00:00:00 2001 From: cottongin Date: Sun, 8 Mar 2026 05:56:10 -0400 Subject: [PATCH] fix: resolve three reader bugs (confirm eaten, footnotes menu, phantom render) 1. Clear ignoreNextConfirmRelease after transferring state to child activity, so the next Confirm press isn't silently consumed. 2. Add conditional FOOTNOTES entry to reader menu when the current book has footnotes. 3. Guard clock-minute requestUpdate() with !isReaderActivity() to prevent full e-ink re-renders every minute while reading. Made-with: Cursor --- src/activities/reader/EpubReaderActivity.cpp | 1 + src/activities/reader/EpubReaderMenuActivity.cpp | 3 +++ src/main.cpp | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/activities/reader/EpubReaderActivity.cpp b/src/activities/reader/EpubReaderActivity.cpp index e339fe89..0d4ad8a6 100644 --- a/src/activities/reader/EpubReaderActivity.cpp +++ b/src/activities/reader/EpubReaderActivity.cpp @@ -447,6 +447,7 @@ void EpubReaderActivity::onReaderMenuConfirm(EpubReaderMenuActivity::MenuAction : epub->getTocIndexForSpineIndex(currentSpineIndex); const std::string path = epub->getPath(); const bool consumeRelease = ignoreNextConfirmRelease; + ignoreNextConfirmRelease = false; startActivityForResult( std::make_unique(renderer, mappedInput, epub, path, spineIdx, tocIdx, consumeRelease), diff --git a/src/activities/reader/EpubReaderMenuActivity.cpp b/src/activities/reader/EpubReaderMenuActivity.cpp index 1f04429a..828777d6 100644 --- a/src/activities/reader/EpubReaderMenuActivity.cpp +++ b/src/activities/reader/EpubReaderMenuActivity.cpp @@ -39,6 +39,9 @@ std::vector EpubReaderMenuActivity::buildMenuI items.push_back({MenuAction::ADD_BOOKMARK, StrId::STR_ADD_BOOKMARK}); } items.push_back({MenuAction::DICTIONARY, StrId::STR_DICTIONARY}); + if (hasFootnotes) { + items.push_back({MenuAction::FOOTNOTES, StrId::STR_FOOTNOTES}); + } items.push_back({MenuAction::TOGGLE_ORIENTATION, StrId::STR_TOGGLE_ORIENTATION}); items.push_back({MenuAction::TOGGLE_FONT_SIZE, StrId::STR_TOGGLE_FONT_SIZE}); items.push_back({MenuAction::LETTERBOX_FILL, StrId::STR_OVERRIDE_LETTERBOX_FILL}); diff --git a/src/main.cpp b/src/main.cpp index e3fc5a2c..0924681f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -406,7 +406,7 @@ void loop() { } // Refresh screen when the displayed minute changes (clock in header) - if (SETTINGS.clockFormat != CrossPointSettings::CLOCK_OFF) { + if (SETTINGS.clockFormat != CrossPointSettings::CLOCK_OFF && !activityManager.isReaderActivity()) { static int lastRenderedMinute = -1; static bool sawInvalidTime = false; time_t now = time(nullptr);