Introduce "koration" duration api

This commit is contained in:
schroda
2025-10-11 00:39:44 +02:00
parent f961e734bc
commit f539afb404
19 changed files with 77 additions and 43 deletions

View File

@@ -9,6 +9,7 @@
import { MutableRefObject, RefObject, useCallback, useEffect } from 'react';
import { Direction } from '@mui/material/styles';
import { t as translate } from 'i18next';
import { d } from 'koration';
import {
getNextIndexFromPage,
getNextPageIndex,
@@ -473,7 +474,10 @@ export class ReaderControls {
clearTimeout(ReaderControls.updateCurrentPageTimeout);
if (debounceChapterUpdate) {
ReaderControls.updateCurrentPageTimeout = setTimeout(handleCurrentPageIndexChange, 1000);
ReaderControls.updateCurrentPageTimeout = setTimeout(
handleCurrentPageIndexChange,
d(1).seconds.inWholeMilliseconds,
);
return;
}