diff --git a/apps/dtlaunch/app-b2.js b/apps/dtlaunch/app-b2.js index 7c75f291b..80ee36eca 100644 --- a/apps/dtlaunch/app-b2.js +++ b/apps/dtlaunch/app-b2.js @@ -15,13 +15,8 @@ let settings = Object.assign({ if (settings.oneClickExit) { var buttonWatch = setWatch(_=> returnToClock, BTN1); -} - -// taken from Icon Launcher with minor alterations -if (settings.timeOut!="Off"){ - let time=parseInt(settings.timeOut); //the "s" will be trimmed by the parseInt - var timeoutToClock = setTimeout(returnToClock,time*1000); } + let s = require("Storage"); var apps = s.list(/\.info$/).map(app=>{ let a=s.readJSON(app,1); @@ -186,4 +181,10 @@ const returnToClock = function() { setTimeout(eval, 0, s.read(".bootcde")); }; +// taken from Icon Launcher with minor alterations +if (settings.timeOut!="Off"){ + let time=parseInt(settings.timeOut); //the "s" will be trimmed by the parseInt + var timeoutToClock = setTimeout(returnToClock,time*1000); +} + } // end of app scope diff --git a/apps/dtlaunch/settings-b2.js b/apps/dtlaunch/settings-b2.js index 6d4c98c38..80ad0414a 100644 --- a/apps/dtlaunch/settings-b2.js +++ b/apps/dtlaunch/settings-b2.js @@ -59,10 +59,10 @@ min: 0, max: timeOutChoices.length-1, format: v => timeOutChoices[v], - onchange: m => { - settings.timeOut = m; + onchange: v => { + settings.timeOut = timeOutChoices[v]; writeSettings(); } }, }); -}) +});