mirror of
https://github.com/YACReader/yacreader
synced 2025-07-14 02:54:46 -04:00
Fix currentPage value when closing YACReader in double page mode
If the latest page of the comic is visible, that should be the currentPage value so YACReaderLibrary can mark the comic as read.
This commit is contained in:
@ -1128,7 +1128,9 @@ void Viewer::updateComic(ComicDB &comic)
|
||||
if (!doublePage || (doublePage && render->currentPageIsDoublePage() == false)) {
|
||||
comic.info.currentPage = render->getIndex() + 1;
|
||||
} else {
|
||||
if (!(render->getIndex() + 1 == comic.info.currentPage || render->getIndex() + 2 == comic.info.currentPage)) {
|
||||
if (doublePage && render->currentPageIsDoublePage() && (render->getIndex() + 2 >= render->numPages())) {
|
||||
comic.info.currentPage = std::min(render->numPages(), render->getIndex() + 2);
|
||||
} else {
|
||||
comic.info.currentPage = std::min(render->numPages(), render->getIndex() + 1);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user