ui: Fix starting settings refresh
This commit is contained in:
parent
f32873f307
commit
cc147a9819
@ -57,10 +57,10 @@ function createSettingsStore() {
|
||||
cb = function(stgs) {
|
||||
const srv_cur = new Date(Date.now() + (stgs.currentTime - stgs.recvTime));
|
||||
|
||||
if (settings.start > srv_cur) {
|
||||
const startIn = settings.start - srv_cur;
|
||||
if (stgs.start > srv_cur) {
|
||||
const startIn = stgs.start - srv_cur;
|
||||
if (startIn > 15000) {
|
||||
setTimeout(refreshFunc, Math.floor(Math.random() * 10000) + 2400)
|
||||
setTimeout(refreshFunc, Math.floor(Math.random() * 3500) + 10000);
|
||||
} else if (startIn > 1500) {
|
||||
setTimeout(refreshFunc, startIn - 1000 - Math.floor(Math.random() * 500))
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user