diff --git a/src/activities/reader/TxtReaderActivity.cpp b/src/activities/reader/TxtReaderActivity.cpp index db0114e..62e8665 100644 --- a/src/activities/reader/TxtReaderActivity.cpp +++ b/src/activities/reader/TxtReaderActivity.cpp @@ -11,6 +11,7 @@ #include "CrossPointSettings.h" #include "CrossPointState.h" #include "MappedInputManager.h" +#include "RecentBooksStore.h" #include "ScreenComponents.h" #include "fontIds.h" @@ -103,11 +104,12 @@ void TxtReaderActivity::onEnter() { }); } - // Save current txt as last opened file and cache title for home screen + // Save current txt as last opened file and add to recent books APP_STATE.openEpubPath = txt->getPath(); APP_STATE.openBookTitle = txt->getTitle(); APP_STATE.openBookAuthor.clear(); // TXT files don't have author metadata APP_STATE.saveToFile(); + RECENT_BOOKS.addBook(txt->getPath()); // Trigger first update updateRequired = true;