update timeout to clock per new implementation in Icon Launcher
parent
23a0c2fc2f
commit
ef1cf7ef7b
|
|
@ -182,9 +182,14 @@ const returnToClock = function() {
|
|||
};
|
||||
|
||||
// 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);
|
||||
}
|
||||
var timeoutToClock;
|
||||
const updateTimeoutToClock = function(){
|
||||
if (settings.timeOut!="Off"){
|
||||
let time=parseInt(settings.timeOut); //the "s" will be trimmed by the parseInt
|
||||
if (timeoutToClock) clearTimeout(timeoutToClock);
|
||||
timeoutToClock = setTimeout(returnToClock,time*1000);
|
||||
}
|
||||
};
|
||||
updateTimeoutToClock();
|
||||
|
||||
} // end of app scope
|
||||
|
|
|
|||
Loading…
Reference in New Issue