fix(lastN): Update only if neccessary.

This commit is contained in:
Hristo Terezov 2023-02-23 14:55:02 -06:00
parent f3481576ff
commit 4b29af6b5f
1 changed files with 5 additions and 1 deletions

View File

@ -88,7 +88,11 @@ const _updateLastN = debounce(({ dispatch, getState }: IStore) => {
lastNSelected = 1;
}
dispatch(setLastN(lastNSelected));
const { lastN } = state['features/base/lastn'];
if (lastN !== lastNSelected) {
dispatch(setLastN(lastNSelected));
}
}, 1000); /* Don't send this more often than once a second. */