After changes in e4253633c9 the transition page content wasn't properly centered anymore in the single/double reading mode depending on the applied reader settings (scale type, stretch, reader width)
When e.g. enabling the "offset spread pages" setting the current page index was still the one of the secondary page, which then caused the first page to get skipped.
Due to handling an "offset spread page" change as if the "double page" mode got activated, the index of the secondary page was set, which resulted in opening the next page
Depending on the screen size and e.g. the set "reader width" pages might not have filled out the full img elements size due to "object-fit contain".
This was caused due to the image wrappers flex container "align-items center" which slightly reduced the images width to some ".xy" number (e.g. instead of wrappers width 258px, the images were something like 257.83px)
In case two pages were displayed with different dimensions, the bigger page might take up more than 50% of the screen.
In this case the bigger page got limited to 50% which caused in to unintentionally get reduced in size
In case "endReached" is force set to "true" the chapters last page index should always be set to prevent 2 chapter updates
- 1. for second to last page, read true
- 2. last page, read true
This only happens in "continuous pagers" which have to handle cases where the end of the last page is already visible while the last page itself is too small to ever get set as the "current page index"
To be able to properly prevent unnecessary chapter updates, the ongoing updates have to finish, so that the apollo cache is update to date.
Otherwise, the update guard will always be false since the apollo caches chapter data is still from before the previous updates were triggered.
In case the first/last page was opened and a specific page was selected, instead of opening the page, the previous/next chapter was opened due to incorrectly handling the page change as a previous/next page change