From 62ba6b8410e6b0d48c1c50c0d3a6d89ac8dad086 Mon Sep 17 00:00:00 2001 From: jpirnay Date: Mon, 13 Apr 2026 20:33:05 +0200 Subject: [PATCH] Fix application of remote progress --- src/activities/reader/KOReaderSyncActivity.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/activities/reader/KOReaderSyncActivity.cpp b/src/activities/reader/KOReaderSyncActivity.cpp index 871a7630..05810e77 100644 --- a/src/activities/reader/KOReaderSyncActivity.cpp +++ b/src/activities/reader/KOReaderSyncActivity.cpp @@ -440,7 +440,10 @@ void KOReaderSyncActivity::resumeReader(const KOReaderSyncOutcomeState outcome, sync.resultPage = appliedResult->page; sync.resultParagraphIndex = appliedResult->paragraphIndex; sync.resultHasParagraphIndex = appliedResult->hasParagraphIndex; - } else { + } else if (outcome != KOReaderSyncOutcomeState::APPLIED_REMOTE) { + // Only zero the result fields when not resuming an already-applied remote + // position. The PULL_REMOTE path pre-saves the mapped result into APP_STATE + // before entering APPLY_COMPLETE; zeroing here would overwrite it. sync.resultSpineIndex = 0; sync.resultPage = 0; sync.resultParagraphIndex = 0;