[Minor] use this.async instead of setTimeout

This commit is contained in:
Robert von Burg 2022-02-11 10:48:16 +01:00
parent ffe9eb016a
commit 06a6c398f6
1 changed files with 4 additions and 4 deletions

View File

@ -319,9 +319,9 @@
console.log("Validating session..."); console.log("Validating session...");
} }
setTimeout(function () { this.async(function () {
this.$.usernameInput.focus(); this.$.usernameInput.focus();
}.bind(this), 100); }, 100);
}, },
sessionValidated: function (e) { sessionValidated: function (e) {
@ -363,9 +363,9 @@
} else { } else {
// check again in delayMin min // check again in delayMin min
console.log("Keep alive is " + keepAliveDays + " days and expiring in the future. Delaying refresh for " + delayMin + "m..."); console.log("Keep alive is " + keepAliveDays + " days and expiring in the future. Delaying refresh for " + delayMin + "m...");
setTimeout(function () { this.async(function () {
this.handleKeepAlive(Strolch.getUserConfig()); this.handleKeepAlive(Strolch.getUserConfig());
}.bind(this), delayMin * 60 * 1000); }, delayMin * 60 * 1000);
} }
} else if (keepAliveMinutes < 15) { } else if (keepAliveMinutes < 15) {