Remove Bangle.drawWidgets, change timeout duration

master
thyttan 2023-02-16 20:09:02 +01:00 committed by GitHub
parent da76c91d06
commit 0660f72011
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 5 deletions

View File

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