From 06a6c398f6b813ffb6fca5a97012b0016e60be15 Mon Sep 17 00:00:00 2001 From: Robert von Burg Date: Fri, 11 Feb 2022 10:48:16 +0100 Subject: [PATCH] [Minor] use this.async instead of setTimeout --- strolch-wc-auth.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/strolch-wc-auth.html b/strolch-wc-auth.html index 20cdc31..605a566 100644 --- a/strolch-wc-auth.html +++ b/strolch-wc-auth.html @@ -319,9 +319,9 @@ console.log("Validating session..."); } - setTimeout(function () { + this.async(function () { this.$.usernameInput.focus(); - }.bind(this), 100); + }, 100); }, sessionValidated: function (e) { @@ -363,9 +363,9 @@ } else { // check again in delayMin min 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()); - }.bind(this), delayMin * 60 * 1000); + }, delayMin * 60 * 1000); } } else if (keepAliveMinutes < 15) {