launch the right app for the alert and try to preserve stepsArray

pull/1714/head
Stiralbios 2022-04-07 18:29:12 +02:00
parent 47f9e581a3
commit 269b573209
2 changed files with 4 additions and 4 deletions

View File

@ -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();
});

View File

@ -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');
}
}
}