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);