forked from FOSS/BangleApps
make timeout to clock work
parent
479f0e3d69
commit
675953ddcd
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
},
|
||||
});
|
||||
})
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue