2022-04-07 16:16:51 +00:00
|
|
|
g.clear();
|
2022-04-07 12:40:48 +00:00
|
|
|
Bangle.loadWidgets();
|
|
|
|
Bangle.drawWidgets();
|
2022-04-07 16:16:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* draw the alert */
|
|
|
|
E.showPrompt("Innactivity detected",{
|
|
|
|
title:"Activity reminder",
|
|
|
|
buttons : {"Ok": true,"Dismiss": false}
|
|
|
|
}).then(function(v) {
|
2022-04-07 16:29:12 +00:00
|
|
|
console.log(global.stepsArray);
|
2022-04-07 16:16:51 +00:00
|
|
|
if(v == true){
|
2022-04-07 16:29:12 +00:00
|
|
|
global.stepsArray = global.stepsArray.slice(0, activityreminder.maxInnactivityMin - 3);
|
2022-04-07 16:16:51 +00:00
|
|
|
}
|
|
|
|
if(v == false){
|
2022-04-07 16:29:12 +00:00
|
|
|
global.stepsArray = global.stepsArray.slice(0, activityreminder.maxInnactivityMin - activityreminder.dismissDelayMin);
|
2022-04-07 16:16:51 +00:00
|
|
|
}
|
|
|
|
load();
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
Bangle.buzz();
|
|
|
|
setTimeout(load, 10000);
|
|
|
|
|