fix: add txt books to recent tab (#526)

Fixes #512

---

### AI Usage

 _**NO**_
This commit is contained in:
Егор Мартынов 2026-01-27 18:53:31 +07:00 committed by GitHub
parent a4b9a43ca1
commit e2ca0e94ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,6 +8,7 @@
#include "CrossPointSettings.h"
#include "CrossPointState.h"
#include "MappedInputManager.h"
#include "RecentBooksStore.h"
#include "ScreenComponents.h"
#include "fontIds.h"
@ -55,9 +56,10 @@ void TxtReaderActivity::onEnter() {
txt->setupCacheDir();
// Save current txt as last opened file
// Save current txt as last opened file and add to recent books
APP_STATE.openEpubPath = txt->getPath();
APP_STATE.saveToFile();
RECENT_BOOKS.addBook(txt->getPath());
// Trigger first update
updateRequired = true;