From b0921ab3c8d773ec3e462f67c4fdeb7200813160 Mon Sep 17 00:00:00 2001 From: jpirnay Date: Mon, 4 May 2026 17:38:24 +0200 Subject: [PATCH] Resync properly --- src/activities/reader/EpubReaderActivity.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/activities/reader/EpubReaderActivity.cpp b/src/activities/reader/EpubReaderActivity.cpp index 844fe9a5..0a03cda5 100644 --- a/src/activities/reader/EpubReaderActivity.cpp +++ b/src/activities/reader/EpubReaderActivity.cpp @@ -897,8 +897,8 @@ void EpubReaderActivity::applyPendingSyncSession() { int restoreSpineIndex = sync.spineIndex; int restorePage = sync.page; - pendingParagraphLookup = sync.hasParagraphIndex; - pendingParagraphIndex = sync.paragraphIndex; + pendingParagraphLookup = false; + pendingParagraphIndex = 0; if (restoreSpineIndex < 0 || restoreSpineIndex >= epub->getSpineItemsCount()) { LOG_ERR("ERS", "Invalid sync restore spine index %d, resetting to 0", restoreSpineIndex); @@ -916,8 +916,7 @@ void EpubReaderActivity::applyPendingSyncSession() { LOG_DBG("ERS", "Applied synced remote position: spine=%d page=%d paragraph=%u hasParagraph=%s", restoreSpineIndex, restorePage, pendingParagraphIndex, pendingParagraphLookup ? "yes" : "no"); } else { - LOG_DBG("ERS", "Restored local pre-sync position: spine=%d page=%d paragraph=%u hasParagraph=%s", restoreSpineIndex, - restorePage, pendingParagraphIndex, pendingParagraphLookup ? "yes" : "no"); + LOG_DBG("ERS", "Restored local pre-sync position: spine=%d page=%d", restoreSpineIndex, restorePage); } // sync.totalPagesInSpine is the page count of the local spine at launch time.