Flexible update timeout value
This commit is contained in:
parent
fe68e99c7c
commit
9ac9481105
|
@ -802,9 +802,12 @@ function networkThreadedView(App $a, $update = 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// When checking for updates we need to fetch from the newest date to the newest date before
|
// When checking for updates we need to fetch from the newest date to the newest date before
|
||||||
// Only do this, when the last stored date isn't too long ago
|
// Only do this, when the last stored date isn't too long ago (10 times the update interval)
|
||||||
if ($update && !empty($_SESSION['network_last_date']) && ($bottom_limit > $_SESSION['network_last_date']) &&
|
$browser_update = PConfig::get(local_user(), 'system', 'update_interval', 40000) / 1000;
|
||||||
((time() - $_SESSION['network_last_date_timestamp']) < 60)) {
|
|
||||||
|
if (($browser_update > 0) && $update && !empty($_SESSION['network_last_date']) &&
|
||||||
|
($bottom_limit > $_SESSION['network_last_date']) &&
|
||||||
|
((time() - $_SESSION['network_last_date_timestamp']) < ($browser_update * 10))) {
|
||||||
$bottom_limit = $_SESSION['network_last_date'];
|
$bottom_limit = $_SESSION['network_last_date'];
|
||||||
}
|
}
|
||||||
$_SESSION['network_last_date'] = defaults($_SESSION, 'network_last_top_limit', $top_limit);
|
$_SESSION['network_last_date'] = defaults($_SESSION, 'network_last_top_limit', $top_limit);
|
||||||
|
|
Loading…
Reference in a new issue