1
0
Fork 0

make timeout to clock work

master
thyttan 2022-11-06 20:20:51 +01:00
parent 479f0e3d69
commit 675953ddcd
2 changed files with 10 additions and 9 deletions

View File

@ -17,11 +17,6 @@ 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

View File

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