diff --git a/apps/activityreminder/ChangeLog b/apps/activityreminder/ChangeLog index 3811425ac..76f0945c8 100644 --- a/apps/activityreminder/ChangeLog +++ b/apps/activityreminder/ChangeLog @@ -8,3 +8,4 @@ 0.08: Use default Bangle formatter for booleans 0.09: New app screen (instead of showing settings or the alert) and some optimisations 0.10: Add software back button via setUI +0.11: Add setting to unlock screen diff --git a/apps/activityreminder/alert.js b/apps/activityreminder/alert.js index 96a9b76c4..eba305d0c 100644 --- a/apps/activityreminder/alert.js +++ b/apps/activityreminder/alert.js @@ -26,6 +26,13 @@ if (!(storage.readJSON('setting.json', 1) || {}).quiet) { Bangle.buzz(400); } + + if ((storage.readJSON('activityreminder.s.json', 1) || {}).unlock) { + console.log("unlock"); + Bangle.setLocked(false); + Bangle.setLCDPower(1); + } + setTimeout(load, 20000); } @@ -34,4 +41,4 @@ Bangle.drawWidgets(); run(); -})(); \ No newline at end of file +})(); diff --git a/apps/activityreminder/metadata.json b/apps/activityreminder/metadata.json index a7fb0c487..a5df15a26 100644 --- a/apps/activityreminder/metadata.json +++ b/apps/activityreminder/metadata.json @@ -3,7 +3,7 @@ "name": "Activity Reminder", "shortName":"Activity Reminder", "description": "A reminder to take short walks for the ones with a sedentary lifestyle", - "version":"0.10", + "version":"0.11", "icon": "app.png", "type": "app", "tags": "tool,activity", diff --git a/apps/activityreminder/settings.js b/apps/activityreminder/settings.js index 051c0dcd8..7bcd8ca90 100644 --- a/apps/activityreminder/settings.js +++ b/apps/activityreminder/settings.js @@ -75,7 +75,14 @@ settings.tempThreshold = v; activityreminder.writeSettings(settings); } - } + }, + 'Unlock on alarm': { + value: settings.unlock, + onchange: v => { + settings.unlock = v; + activityreminder.writeSettings(settings); + } + }, }; return mainMenu;