Remove unused args in "createUpdateReaderPageLoadState"
This commit is contained in:
@@ -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],
|
||||
);
|
||||
|
||||
|
||||
@@ -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,
|
||||
) =>
|
||||
|
||||
Reference in New Issue
Block a user