refactor: rename MyLibrary to FileBrowser (#1260)
## Summary * Renames MyLibrary component to FileBrowser, as it better reflects what it is, in my opinion ## Additional Context * Frees the Library name for possible future library component that can cache metadata, provide other ways of browsing than filesystem structure, etc --- ### AI Usage Did you use AI tools to help write this code? _**< YES >**_
This commit is contained in:
committed by
GitHub
parent
7dc518624c
commit
f0a549b680
@@ -180,7 +180,7 @@ void EpubReaderActivity::loop() {
|
||||
|
||||
// Long press BACK (1s+) goes to file selection
|
||||
if (mappedInput.isPressed(MappedInputManager::Button::Back) && mappedInput.getHeldTime() >= goHomeMs) {
|
||||
activityManager.goToMyLibrary(epub ? epub->getPath() : "");
|
||||
activityManager.goToFileBrowser(epub ? epub->getPath() : "");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ std::unique_ptr<Txt> ReaderActivity::loadTxt(const std::string& path) {
|
||||
void ReaderActivity::goToLibrary(const std::string& fromBookPath) {
|
||||
// If coming from a book, start in that book's folder; otherwise start from root
|
||||
auto initialPath = fromBookPath.empty() ? "/" : extractFolderPath(fromBookPath);
|
||||
activityManager.goToMyLibrary(std::move(initialPath));
|
||||
activityManager.goToFileBrowser(std::move(initialPath));
|
||||
}
|
||||
|
||||
void ReaderActivity::onGoToEpubReader(std::unique_ptr<Epub> epub) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include <memory>
|
||||
|
||||
#include "../Activity.h"
|
||||
#include "activities/home/MyLibraryActivity.h"
|
||||
#include "activities/home/FileBrowserActivity.h"
|
||||
|
||||
class Epub;
|
||||
class Xtc;
|
||||
|
||||
@@ -76,7 +76,7 @@ void TxtReaderActivity::onExit() {
|
||||
void TxtReaderActivity::loop() {
|
||||
// Long press BACK (1s+) goes to file selection
|
||||
if (mappedInput.isPressed(MappedInputManager::Button::Back) && mappedInput.getHeldTime() >= goHomeMs) {
|
||||
activityManager.goToMyLibrary(txt ? txt->getPath() : "");
|
||||
activityManager.goToFileBrowser(txt ? txt->getPath() : "");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ void XtcReaderActivity::loop() {
|
||||
|
||||
// Long press BACK (1s+) goes to file selection
|
||||
if (mappedInput.isPressed(MappedInputManager::Button::Back) && mappedInput.getHeldTime() >= goHomeMs) {
|
||||
activityManager.goToMyLibrary(xtc ? xtc->getPath() : "");
|
||||
activityManager.goToFileBrowser(xtc ? xtc->getPath() : "");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user