This commit is contained in:
Kenneth 2026-01-14 13:12:33 -05:00
parent 4ced80fe39
commit f5a7a56aac
2 changed files with 2 additions and 3 deletions

View File

@ -143,8 +143,7 @@ void ReaderActivity::onGoToTxtReader(std::unique_ptr<Txt> txt) {
currentBookPath = txtPath; currentBookPath = txtPath;
exitActivity(); exitActivity();
enterNewActivity(new TxtReaderActivity( enterNewActivity(new TxtReaderActivity(
renderer, mappedInput, std::move(txt), [this, txtPath] { goToLibrary(txtPath); }, renderer, mappedInput, std::move(txt), [this, txtPath] { goToLibrary(txtPath); }, [this] { onGoBack(); }));
[this] { onGoBack(); }));
} }
void ReaderActivity::onEnter() { void ReaderActivity::onEnter() {

View File

@ -10,7 +10,7 @@ class Txt;
class ReaderActivity final : public ActivityWithSubactivity { class ReaderActivity final : public ActivityWithSubactivity {
std::string initialBookPath; std::string initialBookPath;
std::string currentBookPath; // Track current book path for navigation std::string currentBookPath; // Track current book path for navigation
MyLibraryActivity::Tab libraryTab; // Track which tab to return to MyLibraryActivity::Tab libraryTab; // Track which tab to return to
const std::function<void()> onGoBack; const std::function<void()> onGoBack;
const std::function<void(const std::string&, MyLibraryActivity::Tab)> onGoToLibrary; const std::function<void(const std::string&, MyLibraryActivity::Tab)> onGoToLibrary;