kopia lustrzana https://github.com/cheeaun/phanpy
Slow down polling if scrolled down
rodzic
469ce0df6b
commit
dc2eb1163f
|
@ -282,7 +282,9 @@ function Timeline({
|
||||||
// checkForUpdates interval
|
// checkForUpdates interval
|
||||||
useInterval(
|
useInterval(
|
||||||
loadOrCheckUpdates,
|
loadOrCheckUpdates,
|
||||||
visible && !showNew ? checkForUpdatesInterval : null,
|
visible && !showNew
|
||||||
|
? checkForUpdatesInterval * (nearReachStart ? 1 : 2)
|
||||||
|
: null,
|
||||||
);
|
);
|
||||||
|
|
||||||
const hiddenUI = scrollDirection === 'end' && !nearReachStart;
|
const hiddenUI = scrollDirection === 'end' && !nearReachStart;
|
||||||
|
|
Ładowanie…
Reference in New Issue