mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
ChapterBug // Fix jump to wrong page if chapter number if (number - 1) % pagelength = 0 (#3730)
This commit is contained in:
@@ -466,7 +466,7 @@ export const LightboxComponent: React.FC<IProps> = ({
|
|||||||
function gotoPage(imageIndex: number) {
|
function gotoPage(imageIndex: number) {
|
||||||
const indexInPage = (imageIndex - 1) % pageSize;
|
const indexInPage = (imageIndex - 1) % pageSize;
|
||||||
if (pageCallback) {
|
if (pageCallback) {
|
||||||
let jumppage = Math.floor(imageIndex / pageSize) + 1;
|
let jumppage = Math.floor((imageIndex - 1) / pageSize) + 1;
|
||||||
if (page !== jumppage) {
|
if (page !== jumppage) {
|
||||||
pageCallback({ page: jumppage });
|
pageCallback({ page: jumppage });
|
||||||
oldImages.current = images;
|
oldImages.current = images;
|
||||||
|
|||||||
Reference in New Issue
Block a user