From 434849aa6d990cdeaeb6374b10d12f5d458c04b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B3=D0=BE=D1=80=20=D0=9C=D0=B0=D1=80=D1=82=D1=8B?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2?= Date: Thu, 19 Feb 2026 17:59:15 +0700 Subject: [PATCH] fix: go to prev page on the first one, get teleported to the end of book (#970) ## Summary 1. Go to the first page in a .epub file. 2. Hit `Up` button 3. Get teleported to the last page :) `TxtRenderActivity` seems to have this if check, but EPUB one does not. --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**NO**_ --- src/activities/reader/EpubReaderActivity.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/activities/reader/EpubReaderActivity.cpp b/src/activities/reader/EpubReaderActivity.cpp index 07ecc107..029847c1 100644 --- a/src/activities/reader/EpubReaderActivity.cpp +++ b/src/activities/reader/EpubReaderActivity.cpp @@ -241,7 +241,7 @@ void EpubReaderActivity::loop() { if (prevTriggered) { if (section->currentPage > 0) { section->currentPage--; - } else { + } else if (currentSpineIndex > 0) { // We don't want to delete the section mid-render, so grab the semaphore { RenderLock lock(*this);