Streamline tap zone click handling

This commit is contained in:
schroda
2025-02-17 20:28:26 +01:00
parent 5eb442e760
commit e28c603112

View File

@@ -606,26 +606,10 @@ export class ReaderControls {
setIsOverlayVisible((isVisible) => isStaticNav || !isVisible);
break;
case TapZoneRegionType.PREVIOUS:
if (isContinuousReadingModeActive) {
ReaderControls.scroll(
ScrollOffset.BACKWARD,
scrollDirection,
readingMode.value,
readingDirection.value,
themeDirection,
scrollElement,
openChapter,
setIsOverlayVisible,
setShowPreview,
);
} else {
openPage('previous', 'ltr');
}
break;
case TapZoneRegionType.NEXT:
if (isContinuousReadingModeActive) {
ReaderControls.scroll(
ScrollOffset.FORWARD,
action === TapZoneRegionType.PREVIOUS ? ScrollOffset.BACKWARD : ScrollOffset.FORWARD,
scrollDirection,
readingMode.value,
readingDirection.value,
@@ -636,7 +620,7 @@ export class ReaderControls {
setShowPreview,
);
} else {
openPage('next', 'ltr');
openPage(action === TapZoneRegionType.PREVIOUS ? 'previous' : 'next', 'ltr');
}
break;
default: