feat: footnote returns to original position on deep sleep to avoid losing reading position (#2394)
This commit is contained in:
@@ -177,6 +177,14 @@ void EpubReaderActivity::onExit() {
|
||||
|
||||
APP_STATE.readerActivityLoadCount = 0;
|
||||
APP_STATE.saveToFile();
|
||||
|
||||
// Leaving mid-footnote loses the in-RAM return stack on deep sleep; persist the
|
||||
// pre-footnote position so the book reopens at the link origin, not the footnote.
|
||||
if (footnoteDepth > 0 && epub) {
|
||||
const SavedPosition& origin = savedPositions[0];
|
||||
saveProgress(origin.spineIndex, origin.pageNumber, 0);
|
||||
}
|
||||
|
||||
section.reset();
|
||||
if (pendingReadFolderMove && epub) {
|
||||
const std::string srcPath = epub->getPath();
|
||||
|
||||
Reference in New Issue
Block a user