ui: Fix starting settings refresh

This commit is contained in:
nemunaire 2024-03-16 15:16:33 +01:00
parent f32873f307
commit cc147a9819

View File

@ -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 {