Merge pull request #1778 from myxor/activity_quiet_mode

ActivityReminder: Obey system quiet mode & extend allowed dismiss delay
pull/1790/head
Gordon Williams 2022-05-03 09:12:46 +01:00 committed by GitHub
commit e07d7c0c2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 6 deletions

View File

@ -1,3 +1,4 @@
0.01: New App! 0.01: New App!
0.02: Fix the settings bug and some tweaking 0.02: Fix the settings bug and some tweaking
0.03: Do not alarm while charging 0.03: Do not alarm while charging
0.04: Obey system quiet mode

View File

@ -1,13 +1,14 @@
# Activity reminder # Activity reminder
A reminder to take short walks for the ones with a sedentary lifestyle. A reminder to take short walks for the ones with a sedentary lifestyle.
The alert will popup only if you didn't take your short walk yet The alert will popup only if you didn't take your short walk yet.
Different settings can be personalized: Different settings can be personalized:
- Enable : Enable/Disable the app - Enable : Enable/Disable the app
- Start hour: Hour to start the reminder - Start hour: Hour to start the reminder
- End hour: Hour to end the reminder - End hour: Hour to end the reminder
- Max inactivity: Maximum inactivity time to allow before the alert. From 15 to 60 min - Max inactivity: Maximum inactivity time to allow before the alert. From 15 to 60 min
- Dismiss delay: Delay added before the next alert if the alert is dismissed. From 5 to 15 min - Dismiss delay: Delay added before the next alert if the alert is dismissed. From 5 to 60 min
Notice: If Dissmiss delay > Max inactivity then it will be equal Max inactivity
- Min steps: Minimal amount of steps to count as an activity - Min steps: Minimal amount of steps to count as an activity

View File

@ -13,8 +13,11 @@ function drawAlert(){
} }
load(); load();
}); });
Bangle.buzz(400); // Obey system quiet mode:
if (!(require('Storage').readJSON('setting.json',1)||{}).quiet) {
Bangle.buzz(400);
}
setTimeout(load, 20000); setTimeout(load, 20000);
} }

View File

@ -3,7 +3,7 @@
"name": "Activity Reminder", "name": "Activity Reminder",
"shortName":"Activity Reminder", "shortName":"Activity Reminder",
"description": "A reminder to take short walks for the ones with a sedentary lifestyle", "description": "A reminder to take short walks for the ones with a sedentary lifestyle",
"version":"0.03", "version":"0.04",
"icon": "app.png", "icon": "app.png",
"type": "app", "type": "app",
"tags": "tool,activity", "tags": "tool,activity",

View File

@ -43,7 +43,7 @@
}, },
'Dismiss delay': { 'Dismiss delay': {
value: settings.dismissDelayMin, value: settings.dismissDelayMin,
min: 5, max: 15, min: 5, max: 60,
onchange: v => { onchange: v => {
settings.dismissDelayMin = v; settings.dismissDelayMin = v;
require("activityreminder").writeSettings(settings); require("activityreminder").writeSettings(settings);