diff --git a/apps/activityreminder/app.js b/apps/activityreminder/app.js index 95bdfe6f0..c2b626fb3 100644 --- a/apps/activityreminder/app.js +++ b/apps/activityreminder/app.js @@ -1,9 +1,9 @@ (function () { - + // load variable before defining functions cause it can trigger a ReferenceError const activityreminder = require("activityreminder"); const storage = require("Storage"); const activityreminder_settings = activityreminder.loadSettings(); - const activityreminder_data = activityreminder.loadData(); + let activityreminder_data = activityreminder.loadData(); function drawAlert() { E.showPrompt("Inactivity detected", { diff --git a/apps/activityreminder/boot.js b/apps/activityreminder/boot.js index c87dde3b2..4d6847a20 100644 --- a/apps/activityreminder/boot.js +++ b/apps/activityreminder/boot.js @@ -1,9 +1,9 @@ (function () { - + // load variable before defining functions cause it can trigger a ReferenceError const activityreminder = require("activityreminder"); const activityreminder_settings = activityreminder.loadSettings(); if (activityreminder_settings.enabled) { - const activityreminder_data = activityreminder.loadData(); + let activityreminder_data = activityreminder.loadData(); if (activityreminder_data.firstLoad) { activityreminder_data.firstLoad = false; activityreminder.saveData(activityreminder_data); diff --git a/apps/activityreminder/lib.js b/apps/activityreminder/lib.js index e0f7caca3..704d35641 100644 --- a/apps/activityreminder/lib.js +++ b/apps/activityreminder/lib.js @@ -21,7 +21,7 @@ exports.saveData = function (data) { exports.loadData = function () { let health = Bangle.getHealthStatus("day"); - const data = Object.assign({ + let data = Object.assign({ firstLoad: true, stepsDate: new Date(), stepsOnDate: health.steps, diff --git a/apps/activityreminder/settings.js b/apps/activityreminder/settings.js index b4d288500..ce7cdc913 100644 --- a/apps/activityreminder/settings.js +++ b/apps/activityreminder/settings.js @@ -1,7 +1,7 @@ (function (back) { // Load settings const activityreminder = require("activityreminder"); - const settings = activityreminder.loadSettings(); + let settings = activityreminder.loadSettings(); // Show the menu E.showMenu({