Slow down polling if scrolled down
This commit is contained in:
parent
469ce0df6b
commit
dc2eb1163f
|
@ -282,7 +282,9 @@ function Timeline({
|
|||
// checkForUpdates interval
|
||||
useInterval(
|
||||
loadOrCheckUpdates,
|
||||
visible && !showNew ? checkForUpdatesInterval : null,
|
||||
visible && !showNew
|
||||
? checkForUpdatesInterval * (nearReachStart ? 1 : 2)
|
||||
: null,
|
||||
);
|
||||
|
||||
const hiddenUI = scrollDirection === 'end' && !nearReachStart;
|
||||
|
|
Loading…
Reference in a new issue