Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
jpirnay
2026-04-27 18:45:16 +02:00
co-authored by Copilot
parent aed297b2b1
commit 066ec3d56b
6 changed files with 30 additions and 17 deletions
@@ -898,6 +898,14 @@ bool EpubReaderActivity::tryAutoPushOnClose() {
if (!epub) {
return false;
}
const int spineCount = epub->getSpineItemsCount();
if (spineCount == 0 || currentSpineIndex >= spineCount || !section) {
LOG_DBG("ERS", "Skipping AUTO_PUSH on end-of-book sentinel: spine=%d section=%s", currentSpineIndex,
section ? "present" : "null");
return false;
}
// exitToHomeAfterSync flag is set inside launchKOReaderSync for AUTO_PUSH mode.
launchKOReaderSync(SyncLaunchMode::AUTO_PUSH);
return true;