mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -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:
parent
250c48848c
commit
0afe2c33b7
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user