Merge branch 'master' of https://github.com/jpirnay/crosspoint-reader into feat-page-overlay

This commit is contained in:
jpirnay
2026-03-05 18:28:38 +01:00
33 changed files with 268 additions and 172 deletions
+5 -3
View File
@@ -182,7 +182,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;
}
@@ -573,14 +573,16 @@ void EpubReaderActivity::render(RenderLock&& lock) {
if (!section->loadSectionFile(SETTINGS.getReaderFontId(), SETTINGS.getReaderLineCompression(),
SETTINGS.extraParagraphSpacing, SETTINGS.paragraphAlignment, viewportWidth,
viewportHeight, SETTINGS.hyphenationEnabled, SETTINGS.embeddedStyle)) {
viewportHeight, SETTINGS.hyphenationEnabled, SETTINGS.embeddedStyle,
SETTINGS.imageRendering)) {
LOG_DBG("ERS", "Cache not found, building...");
const auto popupFn = [this]() { GUI.drawPopup(renderer, tr(STR_INDEXING)); };
if (!section->createSectionFile(SETTINGS.getReaderFontId(), SETTINGS.getReaderLineCompression(),
SETTINGS.extraParagraphSpacing, SETTINGS.paragraphAlignment, viewportWidth,
viewportHeight, SETTINGS.hyphenationEnabled, SETTINGS.embeddedStyle, popupFn)) {
viewportHeight, SETTINGS.hyphenationEnabled, SETTINGS.embeddedStyle,
SETTINGS.imageRendering, popupFn)) {
LOG_ERR("ERS", "Failed to persist page data to SD");
section.reset();
return;
+1 -19
View File
@@ -204,25 +204,7 @@ void KOReaderSyncActivity::onEnter() {
// Check if already connected (e.g. from settings page auth)
if (WiFi.status() == WL_CONNECTED) {
LOG_DBG("KOSync", "Already connected to WiFi");
state = SYNCING;
statusMessage = tr(STR_SYNCING_TIME);
requestUpdate(true);
// Perform sync directly (will be handled in loop)
xTaskCreate(
[](void* param) {
auto* self = static_cast<KOReaderSyncActivity*>(param);
// Sync time first
syncTimeWithNTP();
{
RenderLock lock(*self);
self->statusMessage = tr(STR_CALC_HASH);
}
self->requestUpdate(true);
self->performSync();
vTaskDelete(nullptr);
},
"SyncTask", 4096, this, 1, nullptr);
onWifiSelectionComplete(true);
return;
}
+1 -1
View File
@@ -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) {
+1 -1
View File
@@ -2,7 +2,7 @@
#include <memory>
#include "../Activity.h"
#include "activities/home/MyLibraryActivity.h"
#include "activities/home/FileBrowserActivity.h"
class Epub;
class Xtc;
+1 -1
View File
@@ -135,7 +135,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;
}
+1 -1
View File
@@ -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;
}