home screen performance fix
This commit is contained in:
@@ -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());
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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(), "");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user