diff options
author | sijanec <sijanecantonluka@gmail.com> | 2020-06-08 23:33:22 +0200 |
---|---|---|
committer | sijanec <sijanecantonluka@gmail.com> | 2020-06-08 23:33:22 +0200 |
commit | 867ba5ab831af6b879bf0c3840619d54ff73e3c5 (patch) | |
tree | 2f0e7d604ecc489042d805702f569f7031296960 /dist/js/app.js | |
parent | forgot a semi-crucial thingy (diff) | |
download | beziapp-867ba5ab831af6b879bf0c3840619d54ff73e3c5.tar beziapp-867ba5ab831af6b879bf0c3840619d54ff73e3c5.tar.gz beziapp-867ba5ab831af6b879bf0c3840619d54ff73e3c5.tar.bz2 beziapp-867ba5ab831af6b879bf0c3840619d54ff73e3c5.tar.lz beziapp-867ba5ab831af6b879bf0c3840619d54ff73e3c5.tar.xz beziapp-867ba5ab831af6b879bf0c3840619d54ff73e3c5.tar.zst beziapp-867ba5ab831af6b879bf0c3840619d54ff73e3c5.zip |
Diffstat (limited to '')
-rwxr-xr-x | dist/js/app.js | 8 |
1 files changed, 5 insertions, 3 deletions
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); |