From 867ba5ab831af6b879bf0c3840619d54ff73e3c5 Mon Sep 17 00:00:00 2001 From: sijanec Date: Mon, 8 Jun 2020 23:33:22 +0200 Subject: forgot install smh --- dist/js/app.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'dist/js/app.js') diff --git a/dist/js/app.js b/dist/js/app.js index e2758ff..bfa51ef 100755 --- a/dist/js/app.js +++ b/dist/js/app.js @@ -3,7 +3,7 @@ const app_version = "1.0.14.3-beta"; -const previous_commit = "5f22473be3faa9cd2a50444f8bea4af46725c030"; +const previous_commit = "cdf17dfd5d57b5461831868feb2497073a9b19d6"; const BEZIAPP_UPDATE_INTERVAL = 300; // update vsakih 300 sekund if ("serviceWorker" in navigator) { @@ -110,9 +110,11 @@ window.onunhandledrejection = error_report_function; document.addEventListener("DOMContentLoaded", () => { var update_interval = setInterval(() => { // ok, it's value is never read, so what?! localforage.getItem("lastUpdate").then((data) => { - if (Math.floor(Date.now() / 1000) > data + BEZIAPP_UPDATE_INTERVAL) { + if (Math.floor(Date.now() / 1000) > Number(data) + BEZIAPP_UPDATE_INTERVAL) { // trigger an update - update_app_function(); + localforage.setItem("lastUpdate", Math.floor(Date.now() / 1000)) .then(()=>{ + update_app_function(); + }); } }); }, 1000 * BEZIAPP_UPDATE_INTERVAL); -- cgit v1.2.3