From 269b5732095696d88e8d7ece6d586c58bafbd158 Mon Sep 17 00:00:00 2001 From: Stiralbios Date: Thu, 7 Apr 2022 18:29:12 +0200 Subject: [PATCH] launch the right app for the alert and try to preserve stepsArray --- apps/activityreminder/app.js | 6 +++--- apps/activityreminder/boot.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/activityreminder/app.js b/apps/activityreminder/app.js index 1668e0dc9..45d9247bb 100644 --- a/apps/activityreminder/app.js +++ b/apps/activityreminder/app.js @@ -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(); }); diff --git a/apps/activityreminder/boot.js b/apps/activityreminder/boot.js index 0a3d94793..b69237251 100644 --- a/apps/activityreminder/boot.js +++ b/apps/activityreminder/boot.js @@ -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'); } } }