Fixed merge f'up.

This commit is contained in:
Jonas Diemer 2026-01-27 15:48:36 +01:00
parent f20cb10365
commit 6e24b509ab
2 changed files with 0 additions and 18 deletions

View File

@ -472,7 +472,6 @@ void EpubReaderActivity::renderScreen() {
void EpubReaderActivity::saveProgress(int spineIndex, int page) { void EpubReaderActivity::saveProgress(int spineIndex, int page) {
FsFile f; FsFile f;
if (SdMan.openFileForWrite("ERS", epub->getCachePath() + "/progress.bin", f)) { if (SdMan.openFileForWrite("ERS", epub->getCachePath() + "/progress.bin", f)) {
<<<<<<< HEAD
uint8_t data[6]; uint8_t data[6];
data[0] = currentSpineIndex & 0xFF; data[0] = currentSpineIndex & 0xFF;
data[1] = (currentSpineIndex >> 8) & 0xFF; data[1] = (currentSpineIndex >> 8) & 0xFF;
@ -481,14 +480,6 @@ void EpubReaderActivity::saveProgress(int spineIndex, int page) {
data[4] = section->pageCount & 0xFF; data[4] = section->pageCount & 0xFF;
data[5] = (section->pageCount >> 8) & 0xFF; data[5] = (section->pageCount >> 8) & 0xFF;
f.write(data, 6); f.write(data, 6);
=======
uint8_t data[4];
data[0] = spineIndex & 0xFF;
data[1] = (spineIndex >> 8) & 0xFF;
data[2] = page & 0xFF;
data[3] = (page >> 8) & 0xFF;
f.write(data, 4);
>>>>>>> 95b7f80 (Refactor saving progress to dedicated function.)
f.close(); f.close();
Serial.printf("[ERS] Progress saved: Chapter %d, Page %d\n", spineIndex, page); Serial.printf("[ERS] Progress saved: Chapter %d, Page %d\n", spineIndex, page);
} else { } else {

View File

@ -188,11 +188,6 @@ void EpubReaderChapterSelectionActivity::renderScreen() {
const auto pageStartIndex = selectorIndex / pageItems * pageItems; const auto pageStartIndex = selectorIndex / pageItems * pageItems;
renderer.fillRect(0, 60 + (selectorIndex % pageItems) * 30 - 2, pageWidth - 1, 30); renderer.fillRect(0, 60 + (selectorIndex % pageItems) * 30 - 2, pageWidth - 1, 30);
<<<<<<< HEAD
=======
// for (int itemIndex = pageStartIndex; itemIndex < totalItems && itemIndex < pageStartIndex + pageItems; itemIndex++)
// {
>>>>>>> e6dd49d (Adding Ebook menu, go home, clear cache options.)
for (int i = 0; i < pageItems; i++) { for (int i = 0; i < pageItems; i++) {
int itemIndex = pageStartIndex + i; int itemIndex = pageStartIndex + i;
if (itemIndex >= totalItems) break; if (itemIndex >= totalItems) break;
@ -209,10 +204,6 @@ void EpubReaderChapterSelectionActivity::renderScreen() {
const std::string chapterName = const std::string chapterName =
renderer.truncatedText(UI_10_FONT_ID, item.title.c_str(), pageWidth - 40 - indentSize); renderer.truncatedText(UI_10_FONT_ID, item.title.c_str(), pageWidth - 40 - indentSize);
<<<<<<< HEAD
=======
// FIX: Use displayY here instead of recalculating based on tocIndex
>>>>>>> e6dd49d (Adding Ebook menu, go home, clear cache options.)
renderer.drawText(UI_10_FONT_ID, indentSize, displayY, chapterName.c_str(), !isSelected); renderer.drawText(UI_10_FONT_ID, indentSize, displayY, chapterName.c_str(), !isSelected);
} }
} }