Add "scroll amount" setting

This commit is contained in:
schroda
2025-03-27 02:09:35 +01:00
parent b93c2d95e5
commit 72fb053971
7 changed files with 81 additions and 19 deletions

View File

@@ -18,7 +18,6 @@ import {
AUTO_SCROLL_SPEED,
CONTINUOUS_READING_MODE_TO_SCROLL_DIRECTION,
READER_PAGE_SCALE_MODE_VALUES,
ReaderScrollAmount,
READING_DIRECTION_VALUES,
READING_MODE_VALUES,
} from '@/modules/reader/constants/ReaderSettings.constants.tsx';
@@ -79,6 +78,7 @@ export const ReaderHotkeys = ({
readingMode,
readingDirection,
autoScroll,
scrollAmount,
} = ReaderService.useSettings();
const automaticScrolling = useReaderAutoScrollContext();
const { setShowPreview } = useReaderTapZoneContext();
@@ -106,10 +106,10 @@ export const ReaderHotkeys = ({
openChapter,
setIsOverlayVisible,
setShowPreview,
ReaderScrollAmount.SMALL,
scrollAmount,
),
{ preventDefault: true },
[readingMode.value, readingDirection.value, themeDirection, openChapter],
[readingMode.value, readingDirection.value, themeDirection, openChapter, scrollAmount],
);
useHotkeys(
hotkeys[ReaderHotkey.SCROLL_FORWARD],
@@ -125,10 +125,10 @@ export const ReaderHotkeys = ({
openChapter,
setIsOverlayVisible,
setShowPreview,
ReaderScrollAmount.SMALL,
scrollAmount,
),
{ preventDefault: true },
[readingMode.value, readingDirection.value, themeDirection, openChapter],
[readingMode.value, readingDirection.value, themeDirection, openChapter, scrollAmount],
);
useHotkeys(
hotkeys[ReaderHotkey.PREVIOUS_CHAPTER],