diff --git a/new-log-viewer/src/components/Layout.tsx b/new-log-viewer/src/components/Layout.tsx index dffc071c..3cbcde46 100644 --- a/new-log-viewer/src/components/Layout.tsx +++ b/new-log-viewer/src/components/Layout.tsx @@ -254,14 +254,17 @@ const Layout = () => { ); updateWindowUrlHashParams({ - logEventNum: firstLogEventNumOnNextPage || logEventNumRef.current < lastFilteredLogEventNum ? + logEventNum: firstLogEventNumOnNextPage || + logEventNumRef.current < lastFilteredLogEventNum ? lastFilteredLogEventNum : numEventsRef.current, }); } break; case ACTION_NAME.LAST_PAGE: - updateWindowUrlHashParams({logEventNum: lastFilteredLogEventNum || numEventsRef.current}); + updateWindowUrlHashParams({ + logEventNum: lastFilteredLogEventNum || numEventsRef.current, + }); break; case ACTION_NAME.PAGE_TOP: goToPositionAndCenter(editor, {lineNumber: 1, column: 1}); diff --git a/new-log-viewer/src/contexts/StateContextProvider.tsx b/new-log-viewer/src/contexts/StateContextProvider.tsx index 4d7d1795..5c8e8a41 100644 --- a/new-log-viewer/src/contexts/StateContextProvider.tsx +++ b/new-log-viewer/src/contexts/StateContextProvider.tsx @@ -1,6 +1,6 @@ // eslint-disable-next-line no-warning-comments // TODO: move handlers out from StateContextProvider. -/* eslint-disable max-lines, max-lines-per-function */ +/* eslint-disable max-lines, max-lines-per-function, max-statements */ import React, { createContext, useCallback, @@ -285,6 +285,7 @@ const StateContextProvider = ({children}: StateContextProviderProps) => { pageNumRef.current = newPageNum; }, [ firstLogEventNumPerPage, + numEvents, numFilteredEvents, logEventNum, ]); diff --git a/new-log-viewer/src/services/MainWorker.ts b/new-log-viewer/src/services/MainWorker.ts index 4a4cd94e..0a13fa59 100644 --- a/new-log-viewer/src/services/MainWorker.ts +++ b/new-log-viewer/src/services/MainWorker.ts @@ -35,6 +35,7 @@ const postResp = ( postMessage({code, args}); }; +// eslint-disable-next-line max-lines-per-function onmessage = async (ev: MessageEvent) => { const {code, args} = ev.data; console.log(`[Renderer -> MainWorker] code=${code}: args=${JSON.stringify(args)}`);