Remove unused args in "createUpdateReaderPageLoadState"

This commit is contained in:
schroda
2025-07-21 23:01:07 +02:00
parent 1fb5b3cc09
commit cc4ab2e0dd
2 changed files with 0 additions and 6 deletions

View File

@@ -213,9 +213,7 @@ const BaseReaderChapterViewer = ({
() =>
createUpdateReaderPageLoadState(
actualPages,
pagesToSpreadState,
setPagesToSpreadState,
pageLoadStates,
(value) => {
if (isCurrentChapterRef.current) {
setContextPageLoadStates(value);
@@ -225,8 +223,6 @@ const BaseReaderChapterViewer = ({
},
readingMode,
),
// do not add "pagesToSpreadState" and "pageLoadStates" as a dependency, otherwise, every page gets re-rendered
// when they change which impacts the performance massively (depending on the total page count)
[actualPages, readingMode],
);

View File

@@ -132,9 +132,7 @@ export const getChapterIdsForDownloadAhead = (
export const createUpdateReaderPageLoadState =
(
actualPages: ReaderStatePages['pages'],
pagesToSpreadState: ReaderPageSpreadState[],
setPagesToSpreadState: React.Dispatch<React.SetStateAction<ReaderPageSpreadState[]>>,
pageLoadStates: ReaderStatePages['pageLoadStates'],
setPageLoadStates: ReaderStatePages['setPageLoadStates'],
readingMode: ReadingMode,
) =>