From 2c80aca7b5fff5b444efc823436a476d57203424 Mon Sep 17 00:00:00 2001 From: Dave Allie Date: Wed, 3 Dec 2025 22:34:16 +1100 Subject: [PATCH] Use correct current page on reader screen Fixes the page counter not updating --- src/screens/EpubReaderScreen.cpp | 2 +- src/screens/EpubReaderScreen.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/screens/EpubReaderScreen.cpp b/src/screens/EpubReaderScreen.cpp index 91ebbca..75ec42c 100644 --- a/src/screens/EpubReaderScreen.cpp +++ b/src/screens/EpubReaderScreen.cpp @@ -159,7 +159,7 @@ void EpubReaderScreen::renderPage() { void EpubReaderScreen::renderStatusBar() const { const auto pageWidth = renderer->getPageWidth(); - std::string progress = std::to_string(currentPage + 1) + " / " + std::to_string(section->pageCount); + std::string progress = std::to_string(section->currentPage + 1) + " / " + std::to_string(section->pageCount); const auto progressTextWidth = renderer->getSmallTextWidth(progress.c_str()); renderer->drawSmallText(pageWidth - progressTextWidth, 765, progress.c_str()); diff --git a/src/screens/EpubReaderScreen.h b/src/screens/EpubReaderScreen.h index 512dfd3..a8ee6c9 100644 --- a/src/screens/EpubReaderScreen.h +++ b/src/screens/EpubReaderScreen.h @@ -14,7 +14,6 @@ class EpubReaderScreen final : public Screen { SemaphoreHandle_t sectionMutex = nullptr; int currentSpineIndex = 0; int nextPageNumber = 0; - int currentPage = 0; bool updateRequired = false; static void taskTrampoline(void* param);