From 33b59ac56f6a08f24db21555b798fdf02f4d791b Mon Sep 17 00:00:00 2001 From: Kenneth Date: Wed, 14 Jan 2026 13:43:11 -0500 Subject: [PATCH] remove unsused functions --- src/activities/reader/ReaderActivity.cpp | 44 ------------------------ src/activities/reader/ReaderActivity.h | 1 - 2 files changed, 45 deletions(-) diff --git a/src/activities/reader/ReaderActivity.cpp b/src/activities/reader/ReaderActivity.cpp index 493375df..14d6623c 100644 --- a/src/activities/reader/ReaderActivity.cpp +++ b/src/activities/reader/ReaderActivity.cpp @@ -72,50 +72,6 @@ std::unique_ptr ReaderActivity::loadTxt(const std::string& path) { return nullptr; } -void ReaderActivity::onSelectBookFile(const std::string& path) { - currentBookPath = path; // Track current book path - exitActivity(); - enterNewActivity(new FullScreenMessageActivity(renderer, mappedInput, "Loading...")); - - if (isXtcFile(path)) { - // Load XTC file - auto xtc = loadXtc(path); - if (xtc) { - onGoToXtcReader(std::move(xtc)); - } else { - exitActivity(); - enterNewActivity(new FullScreenMessageActivity(renderer, mappedInput, "Failed to load XTC", - EpdFontFamily::REGULAR, EInkDisplay::HALF_REFRESH)); - delay(2000); - goToLibrary(); - } - } else if (isTxtFile(path)) { - // Load TXT file - auto txt = loadTxt(path); - if (txt) { - onGoToTxtReader(std::move(txt)); - } else { - exitActivity(); - enterNewActivity(new FullScreenMessageActivity(renderer, mappedInput, "Failed to load TXT", - EpdFontFamily::REGULAR, EInkDisplay::HALF_REFRESH)); - delay(2000); - goToLibrary(); - } - } else { - // Load EPUB file - auto epub = loadEpub(path); - if (epub) { - onGoToEpubReader(std::move(epub)); - } else { - exitActivity(); - enterNewActivity(new FullScreenMessageActivity(renderer, mappedInput, "Failed to load epub", - EpdFontFamily::REGULAR, EInkDisplay::HALF_REFRESH)); - delay(2000); - goToLibrary(); - } - } -} - void ReaderActivity::goToLibrary(const std::string& fromBookPath) { // If coming from a book, start in that book's folder; otherwise start from root const auto initialPath = fromBookPath.empty() ? "/" : extractFolderPath(fromBookPath); diff --git a/src/activities/reader/ReaderActivity.h b/src/activities/reader/ReaderActivity.h index 4bb7b650..ab74878f 100644 --- a/src/activities/reader/ReaderActivity.h +++ b/src/activities/reader/ReaderActivity.h @@ -21,7 +21,6 @@ class ReaderActivity final : public ActivityWithSubactivity { static bool isTxtFile(const std::string& path); static std::string extractFolderPath(const std::string& filePath); - void onSelectBookFile(const std::string& path); void goToLibrary(const std::string& fromBookPath = ""); void onGoToEpubReader(std::unique_ptr epub); void onGoToXtcReader(std::unique_ptr xtc);