mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2025-12-18 15:17:42 +03:00
Use correct current page on reader screen
Fixes the page counter not updating
This commit is contained in:
parent
7704772ebe
commit
2c80aca7b5
@ -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());
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user