mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-22 09:15:33 +03:00
Slow down polling if scrolled down
This commit is contained in:
parent
469ce0df6b
commit
dc2eb1163f
1 changed files with 3 additions and 1 deletions
|
@ -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