From 63e4c80678d440f2440030b98095d59ef579d7b4 Mon Sep 17 00:00:00 2001 From: Dave Allie Date: Tue, 30 Dec 2025 16:10:17 +1100 Subject: [PATCH] Format --- lib/Epub/Epub/BookMetadataCache.cpp | 5 +++-- src/activities/reader/EpubReaderChapterSelectionActivity.cpp | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/Epub/Epub/BookMetadataCache.cpp b/lib/Epub/Epub/BookMetadataCache.cpp index d110333..6cc7ea7 100644 --- a/lib/Epub/Epub/BookMetadataCache.cpp +++ b/lib/Epub/Epub/BookMetadataCache.cpp @@ -159,8 +159,9 @@ bool BookMetadataCache::buildBookBin(const std::string& epubPath, const BookMeta // Not a huge deal if we don't fine a TOC entry for the spine entry, this is expected behaviour for EPUBs // Logging here is for debugging if (spineEntry.tocIndex == -1) { - Serial.printf("[%lu] [BMC] Warning: Could not find TOC entry for spine item %d: %s, using title from last section\n", millis(), i, - spineEntry.href.c_str()); + Serial.printf( + "[%lu] [BMC] Warning: Could not find TOC entry for spine item %d: %s, using title from last section\n", + millis(), i, spineEntry.href.c_str()); spineEntry.tocIndex = lastSpineTocIndex; } lastSpineTocIndex = spineEntry.tocIndex; diff --git a/src/activities/reader/EpubReaderChapterSelectionActivity.cpp b/src/activities/reader/EpubReaderChapterSelectionActivity.cpp index 4ce9e3c..5f0cab2 100644 --- a/src/activities/reader/EpubReaderChapterSelectionActivity.cpp +++ b/src/activities/reader/EpubReaderChapterSelectionActivity.cpp @@ -124,7 +124,8 @@ void EpubReaderChapterSelectionActivity::renderScreen() { const auto pageStartIndex = selectorIndex / pageItems * pageItems; renderer.fillRect(0, 60 + (selectorIndex % pageItems) * 30 - 2, pageWidth - 1, 30); - for (int tocIndex = pageStartIndex; tocIndex < epub->getTocItemsCount() && tocIndex < pageStartIndex + pageItems; tocIndex++) { + for (int tocIndex = pageStartIndex; tocIndex < epub->getTocItemsCount() && tocIndex < pageStartIndex + pageItems; + tocIndex++) { auto item = epub->getTocItem(tocIndex); renderer.drawText(UI_FONT_ID, 20 + (item.level - 1) * 15, 60 + (tocIndex % pageItems) * 30, item.title.c_str(), tocIndex != selectorIndex);