home screen performance fix

This commit is contained in:
cottongin
2026-01-24 03:59:08 -05:00
parent 2f21f55512
commit 7fce5b347d
9 changed files with 155 additions and 41 deletions

View File

@@ -120,8 +120,10 @@ void EpubReaderActivity::onEnter() {
}
}
// Save current epub as last opened epub and add to recent books
// Save current epub as last opened epub and cache title/author for home screen
APP_STATE.openEpubPath = epub->getPath();
APP_STATE.openBookTitle = epub->getTitle();
APP_STATE.openBookAuthor = epub->getAuthor();
APP_STATE.saveToFile();
RECENT_BOOKS.addBook(epub->getPath(), epub->getTitle(), epub->getAuthor());

View File

@@ -97,8 +97,10 @@ void TxtReaderActivity::onEnter() {
});
}
// Save current txt as last opened file
// Save current txt as last opened file and cache title for home screen
APP_STATE.openEpubPath = txt->getPath();
APP_STATE.openBookTitle = txt->getTitle();
APP_STATE.openBookAuthor.clear(); // TXT files don't have author metadata
APP_STATE.saveToFile();
// Trigger first update

View File

@@ -83,8 +83,10 @@ void XtcReaderActivity::onEnter() {
// Load saved progress
loadProgress();
// Save current XTC as last opened book and add to recent books
// Save current XTC as last opened book and cache title for home screen
APP_STATE.openEpubPath = xtc->getPath();
APP_STATE.openBookTitle = xtc->getTitle();
APP_STATE.openBookAuthor.clear(); // XTC files don't have author metadata
APP_STATE.saveToFile();
RECENT_BOOKS.addBook(xtc->getPath(), xtc->getTitle(), "");