Remove Bangle.drawWidgets, change timeout duration
parent
da76c91d06
commit
0660f72011
|
|
@ -25,19 +25,18 @@
|
||||||
mode: "custom",
|
mode: "custom",
|
||||||
touch: touchHandler,
|
touch: touchHandler,
|
||||||
swipe : swipeHandler,
|
swipe : swipeHandler,
|
||||||
remove: ()=>{if (timeoutToClock) clearTimeout(timeoutToClock);}
|
remove: ()=>{if (timeoutToClock) clearTimeout(timeoutToClock);} // Compatability with Fastload Utils.
|
||||||
});
|
});
|
||||||
|
|
||||||
g.clearRect(Bangle.appRect);
|
g.clearRect(Bangle.appRect);
|
||||||
Bangle.loadWidgets();
|
Bangle.loadWidgets(); // Compatability with Fastload Utils.
|
||||||
Bangle.drawWidgets();
|
|
||||||
|
|
||||||
// taken from Icon Launcher with some alterations
|
// taken from Icon Launcher with some alterations
|
||||||
let timeoutToClock;
|
let timeoutToClock;
|
||||||
const updateTimeoutToClock = function(){
|
const updateTimeoutToClock = function(){
|
||||||
let time=2; // seconds
|
let time = 1000; // milliseconds
|
||||||
if (timeoutToClock) clearTimeout(timeoutToClock);
|
if (timeoutToClock) clearTimeout(timeoutToClock);
|
||||||
timeoutToClock = setTimeout(load,time*1000);
|
timeoutToClock = setTimeout(load,time);
|
||||||
};
|
};
|
||||||
updateTimeoutToClock();
|
updateTimeoutToClock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue