Hide "tap zone overlay" on user action

This commit is contained in:
schroda
2024-12-30 16:50:54 +01:00
parent 6a32395234
commit f3962646e6
3 changed files with 19 additions and 2 deletions

View File

@@ -29,6 +29,7 @@ import { ScrollOffset } from '@/modules/core/Core.types.ts';
import { getOptionForDirection } from '@/modules/theme/services/ThemeCreator.ts';
import { FALLBACK_MANGA } from '@/modules/manga/Manga.constants.ts';
import { useReaderAutoScrollContext } from '@/modules/reader/contexts/ReaderAutoScrollContext.tsx';
import { useReaderTapZoneContext } from '@/modules/reader/contexts/ReaderTapZoneContext.tsx';
const useHotkeys = (...args: Parameters<typeof useHotKeysHook>): ReturnType<typeof useHotKeysHook> => {
const [keys, callback, options, dependencies] = args;
@@ -80,6 +81,7 @@ export const ReaderHotkeys = ({
autoScroll,
} = ReaderService.useSettings();
const automaticScrolling = useReaderAutoScrollContext();
const { setShowPreview } = useReaderTapZoneContext();
const openChapter = ReaderControls.useOpenChapter();
const openPage = ReaderControls.useOpenPage();
@@ -102,6 +104,7 @@ export const ReaderHotkeys = ({
scrollElementRef.current,
openChapter,
setIsOverlayVisible,
setShowPreview,
ReaderScrollAmount.SMALL,
),
{ preventDefault: true },
@@ -120,6 +123,7 @@ export const ReaderHotkeys = ({
scrollElementRef.current,
openChapter,
setIsOverlayVisible,
setShowPreview,
ReaderScrollAmount.SMALL,
),
{ preventDefault: true },