mirror of https://github.com/espruino/BangleApps
launch the right app for the alert and try to preserve stepsArray
parent
47f9e581a3
commit
269b573209
|
@ -8,12 +8,12 @@ E.showPrompt("Innactivity detected",{
|
|||
title:"Activity reminder",
|
||||
buttons : {"Ok": true,"Dismiss": false}
|
||||
}).then(function(v) {
|
||||
console.log(stepsArray);
|
||||
console.log(global.stepsArray);
|
||||
if(v == true){
|
||||
stepsArray = stepsArray.slice(0, activityreminder.maxInnactivityMin - 3);
|
||||
global.stepsArray = global.stepsArray.slice(0, activityreminder.maxInnactivityMin - 3);
|
||||
}
|
||||
if(v == false){
|
||||
stepsArray = stepsArray.slice(0, activityreminder.maxInnactivityMin - activityreminder.dismissDelayMin);
|
||||
global.stepsArray = global.stepsArray.slice(0, activityreminder.maxInnactivityMin - activityreminder.dismissDelayMin);
|
||||
}
|
||||
load();
|
||||
});
|
||||
|
|
|
@ -32,7 +32,7 @@ if (global.activityreminder) {
|
|||
if(stepsArray.length == activityreminder.maxInnactivityMin){
|
||||
if (stepsArray[0] - stepsArray[stepsArray.length-1] < activityreminder.minSteps)
|
||||
{
|
||||
load('authentiwatch.app.js');
|
||||
load('activityreminder.app.js');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue