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",
touch: touchHandler,
swipe : swipeHandler,
remove: ()=>{if (timeoutToClock) clearTimeout(timeoutToClock);}
remove: ()=>{if (timeoutToClock) clearTimeout(timeoutToClock);} // Compatability with Fastload Utils.
});
g.clearRect(Bangle.appRect);
Bangle.loadWidgets();
Bangle.drawWidgets();
Bangle.loadWidgets(); // Compatability with Fastload Utils.
// taken from Icon Launcher with some alterations
let timeoutToClock;
const updateTimeoutToClock = function(){
let time=2; // seconds
let time = 1000; // milliseconds
if (timeoutToClock) clearTimeout(timeoutToClock);
timeoutToClock = setTimeout(load,time*1000);
timeoutToClock = setTimeout(load,time);
};
updateTimeoutToClock();
}