mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-04 14:47:37 +03:00
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:
parent
7d49feea18
commit
616619d0d3
@ -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
|
||||
//
|
||||
|
||||
Loading…
Reference in New Issue
Block a user