Fix: Preserve page number when rotating screen

Previously, rotating the screen would reset the reading position to the beginning of the chapter. This change ensures the current page number is stored and restored after the view re-renders.
This commit is contained in:
Baris Albayrak 2026-01-23 00:01:29 +11:00
parent 7d49feea18
commit 616619d0d3

View File

@ -512,6 +512,11 @@ void EpubReaderActivity::rotateScreen() {
// We don't want to change orientation mid-render, so grab the semaphore
xSemaphoreTake(renderingMutex, portMAX_DELAY);
// If a section is loaded, preserve the current page number
if (section) {
nextPageNumber = section->currentPage;
}
//
// Cycle to next orientation
//