Properly disable previous/next page desktop overlay buttons in double page mode
For the double page mode the secondary page index gets used.
This was changed with 9a8655db2f, however, this occurrence was overlooked
This commit is contained in:
@@ -39,8 +39,8 @@ export const ReaderNavBarDesktopPageNavigation = ({
|
||||
type="previous"
|
||||
title={t(getOptionForDirection('reader.button.previous_page', 'reader.button.next_page', direction))}
|
||||
disabled={getOptionForDirection(
|
||||
!currentPageIndex,
|
||||
currentPage.primary.index === pages.slice(-1)[0].primary.index,
|
||||
!currentPage.primary.index,
|
||||
getNextIndexFromPage(currentPage) === getNextIndexFromPage(pages.slice(-1)[0]),
|
||||
direction,
|
||||
)}
|
||||
onClick={() => openPage('previous', undefined, false)}
|
||||
@@ -64,8 +64,8 @@ export const ReaderNavBarDesktopPageNavigation = ({
|
||||
type="next"
|
||||
title={t(getOptionForDirection('reader.button.next_page', 'reader.button.previous_page', direction))}
|
||||
disabled={getOptionForDirection(
|
||||
currentPage.primary.index === pages.slice(-1)[0].primary.index,
|
||||
!currentPageIndex,
|
||||
getNextIndexFromPage(currentPage) === getNextIndexFromPage(pages.slice(-1)[0]),
|
||||
!currentPage.primary.index,
|
||||
direction,
|
||||
)}
|
||||
onClick={() => openPage('next', undefined, false)}
|
||||
|
||||
Reference in New Issue
Block a user