fix(lastN): Update only if neccessary.
This commit is contained in:
parent
f3481576ff
commit
4b29af6b5f
|
@ -88,7 +88,11 @@ const _updateLastN = debounce(({ dispatch, getState }: IStore) => {
|
||||||
lastNSelected = 1;
|
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. */
|
}, 1000); /* Don't send this more often than once a second. */
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue