move requestResync to HAL

This commit is contained in:
Xuan Son Nguyen
2026-02-16 10:56:40 +01:00
parent c14dc4c109
commit fd933ba368
5 changed files with 13 additions and 15 deletions
-3
View File
@@ -84,7 +84,6 @@ void ReaderActivity::onGoToEpubReader(std::unique_ptr<Epub> epub) {
const auto epubPath = epub->getPath();
currentBookPath = epubPath;
exitActivity();
renderer.requestResync(1);
enterNewActivity(new EpubReaderActivity(
renderer, mappedInput, std::move(epub), [this, epubPath] { goToLibrary(epubPath); }, [this] { onGoBack(); }));
}
@@ -93,7 +92,6 @@ void ReaderActivity::onGoToXtcReader(std::unique_ptr<Xtc> xtc) {
const auto xtcPath = xtc->getPath();
currentBookPath = xtcPath;
exitActivity();
renderer.requestResync(1);
enterNewActivity(new XtcReaderActivity(
renderer, mappedInput, std::move(xtc), [this, xtcPath] { goToLibrary(xtcPath); }, [this] { onGoBack(); }));
}
@@ -102,7 +100,6 @@ void ReaderActivity::onGoToTxtReader(std::unique_ptr<Txt> txt) {
const auto txtPath = txt->getPath();
currentBookPath = txtPath;
exitActivity();
renderer.requestResync(1);
enterNewActivity(new TxtReaderActivity(
renderer, mappedInput, std::move(txt), [this, txtPath] { goToLibrary(txtPath); }, [this] { onGoBack(); }));
}
-5
View File
@@ -149,7 +149,6 @@ void enterDeepSleep() {
APP_STATE.lastSleepFromReader = currentActivity && currentActivity->isReaderActivity();
APP_STATE.saveToFile();
exitActivity();
display.requestResync();
enterNewActivity(new SleepActivity(renderer, mappedInputManager));
display.deepSleep();
@@ -198,10 +197,6 @@ void onGoToBrowser() {
}
void onGoHome() {
const bool returningFromReader = currentActivity && currentActivity->isReaderActivity();
if (returningFromReader) {
display.requestResync(1);
}
exitActivity();
enterNewActivity(new HomeActivity(renderer, mappedInputManager, onGoToReader, onGoToMyLibrary, onGoToRecentBooks,
onGoToSettings, onGoToFileTransfer, onGoToBrowser));