From e2ca0e94ca827a96cc0e88fad44cc7b3ab5b5864 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B3=D0=BE=D1=80=20=D0=9C=D0=B0=D1=80=D1=82=D1=8B?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2?= Date: Tue, 27 Jan 2026 18:53:31 +0700 Subject: [PATCH] fix: add txt books to recent tab (#526) Fixes #512 --- ### AI Usage _**NO**_ --- src/activities/reader/TxtReaderActivity.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/activities/reader/TxtReaderActivity.cpp b/src/activities/reader/TxtReaderActivity.cpp index db725320..b7de16d8 100644 --- a/src/activities/reader/TxtReaderActivity.cpp +++ b/src/activities/reader/TxtReaderActivity.cpp @@ -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;