mirror of https://github.com/espruino/BangleApps
add missing semicolons
parent
ea82ae3f25
commit
7ba81f1ba5
|
@ -2,14 +2,12 @@
|
||||||
// load variable before defining functions cause it can trigger a ReferenceError
|
// load variable before defining functions cause it can trigger a ReferenceError
|
||||||
const activityreminder = require("activityreminder");
|
const activityreminder = require("activityreminder");
|
||||||
const activityreminder_settings = activityreminder.loadSettings();
|
const activityreminder_settings = activityreminder.loadSettings();
|
||||||
let activityreminder_data = null;
|
let activityreminder_data = activityreminder.loadData();
|
||||||
if (activityreminder_settings.enabled) {
|
|
||||||
activityreminder_data = activityreminder.loadData();
|
|
||||||
if (activityreminder_data.firstLoad) {
|
if (activityreminder_data.firstLoad) {
|
||||||
activityreminder_data.firstLoad = false;
|
activityreminder_data.firstLoad = false;
|
||||||
activityreminder.saveData(activityreminder_data);
|
activityreminder.saveData(activityreminder_data);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
function run() {
|
function run() {
|
||||||
if (isNotWorn()) return;
|
if (isNotWorn()) return;
|
||||||
|
@ -42,9 +40,9 @@
|
||||||
|
|
||||||
function isDuringAlertHours(h) {
|
function isDuringAlertHours(h) {
|
||||||
if (activityreminder_settings.startHour < activityreminder_settings.endHour) { // not passing through midnight
|
if (activityreminder_settings.startHour < activityreminder_settings.endHour) { // not passing through midnight
|
||||||
return (h >= activityreminder_settings.startHour && h < activityreminder_settings.endHour)
|
return (h >= activityreminder_settings.startHour && h < activityreminder_settings.endHour);
|
||||||
} else { // passing through midnight
|
} else { // passing through midnight
|
||||||
return (h >= activityreminder_settings.startHour || h < activityreminder_settings.endHour)
|
return (h >= activityreminder_settings.startHour || h < activityreminder_settings.endHour);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue