make load speed more adapted to slow devices

This commit is contained in:
Matthias Wirth
2020-01-07 14:49:33 +01:00
parent 906bef239e
commit f7fdb2f7a3

View File

@@ -424,6 +424,15 @@ function fetchData() {
refreshClock(new Date(now * 1000));
}
if (globeIndex) {
clearTimeout(refreshId);
if (mapIsVisible) {
refreshId = setTimeout(fetchData, RefreshInterval);
} else {
refreshId = setTimeout(fetchData, 55000);
}
}
// Check for stale receiver data
if (last == now && !globeIndex) {
StaleReceiverCount++;