diff --git a/src/activities/boot_sleep/SleepActivity.cpp b/src/activities/boot_sleep/SleepActivity.cpp index 7ffc5851..39460435 100644 --- a/src/activities/boot_sleep/SleepActivity.cpp +++ b/src/activities/boot_sleep/SleepActivity.cpp @@ -238,7 +238,8 @@ void SleepActivity::renderCoverSleepScreen() const { } else if (StringUtils::checkFileExtension(APP_STATE.openEpubPath, ".epub")) { // Handle EPUB file Epub lastEpub(APP_STATE.openEpubPath, "/.crosspoint"); - if (!lastEpub.load()) { + // Skip loading css since we only need metadata here + if (!lastEpub.load(true, true)) { Serial.println("[SLP] Failed to load last epub"); return renderDefaultSleepScreen(); } diff --git a/src/activities/home/HomeActivity.cpp b/src/activities/home/HomeActivity.cpp index 678af7cb..a6aa443b 100644 --- a/src/activities/home/HomeActivity.cpp +++ b/src/activities/home/HomeActivity.cpp @@ -52,7 +52,8 @@ void HomeActivity::onEnter() { // If epub, try to load the metadata for title/author and cover if (StringUtils::checkFileExtension(lastBookTitle, ".epub")) { Epub epub(APP_STATE.openEpubPath, "/.crosspoint"); - epub.load(false); + // Skip loading css since we only need metadata here + epub.load(false, true); if (!epub.getTitle().empty()) { lastBookTitle = std::string(epub.getTitle()); }