Render status bar for empty chapters

This commit is contained in:
Dave Allie 2025-12-08 02:55:28 +11:00
parent ba66f36f4c
commit a8b6f7eff2
No known key found for this signature in database
GPG Key ID: F2FDDB3AD8D0276F

View File

@ -190,6 +190,7 @@ void EpubReaderScreen::renderScreen() {
Serial.println("No pages to render");
const int width = renderer.getTextWidth("Empty chapter", BOLD);
renderer.drawText((renderer.getPageWidth() - width) / 2, 300, "Empty chapter", true, BOLD);
renderStatusBar();
renderer.flushDisplay();
return;
}
@ -198,6 +199,7 @@ void EpubReaderScreen::renderScreen() {
Serial.printf("Page out of bounds: %d (max %d)\n", section->currentPage, section->pageCount);
const int width = renderer.getTextWidth("Out of bounds", BOLD);
renderer.drawText((renderer.getPageWidth() - width) / 2, 300, "Out of bounds", true, BOLD);
renderStatusBar();
renderer.flushDisplay();
return;
}