Fix auto scroll related tsc issues
This commit is contained in:
@@ -879,6 +879,7 @@
|
||||
},
|
||||
"exit_mode": "Open page on exit",
|
||||
"hotkey": {
|
||||
"auto_scroll": "Toggle auto scroll",
|
||||
"menu": "Toggle menu",
|
||||
"next_chapter": "Next chapter",
|
||||
"next_page": "Next page",
|
||||
|
||||
@@ -33,6 +33,7 @@ const READER_HOTKEY_TO_TITLE: Record<ReaderHotkey, TranslationKey> = {
|
||||
[ReaderHotkey.OFFSET_SPREAD_PAGES]: 'reader.settings.hotkey.offset_spread_pages',
|
||||
[ReaderHotkey.CYCLE_READING_MODE]: 'reader.settings.hotkey.reading_mode',
|
||||
[ReaderHotkey.CYCLE_READING_DIRECTION]: 'reader.settings.hotkey.reading_direction',
|
||||
[ReaderHotkey.TOGGLE_AUTO_SCROLL]: 'reader.settings.hotkey.auto_scroll',
|
||||
};
|
||||
|
||||
export const ReaderSettingHotkey = ({
|
||||
|
||||
@@ -11,9 +11,13 @@ import { TReaderAutoScrollContext } from '@/modules/reader/types/Reader.types.ts
|
||||
|
||||
export const ReaderAutoScrollContext = createContext<TReaderAutoScrollContext>({
|
||||
isActive: false,
|
||||
isPaused: false,
|
||||
setScrollRef: () => {},
|
||||
start: () => {},
|
||||
cancel: () => {},
|
||||
toggleActive: () => {},
|
||||
pause: () => {},
|
||||
resume: () => {},
|
||||
});
|
||||
|
||||
export const useReaderAutoScrollContext = () => useContext(ReaderAutoScrollContext);
|
||||
|
||||
Reference in New Issue
Block a user