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
|
// taken from Icon Launcher with minor alterations
|
||||||
if (settings.timeOut!="Off"){
|
var timeoutToClock;
|
||||||
let time=parseInt(settings.timeOut); //the "s" will be trimmed by the parseInt
|
const updateTimeoutToClock = function(){
|
||||||
var timeoutToClock = setTimeout(returnToClock,time*1000);
|
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
|
} // end of app scope
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue