setuichange: don't claer BTN watches

after trying it seemed like it was not necessary.
master
thyttan 2024-07-03 22:20:21 +02:00
parent fb7bc5d88f
commit eaa2918bc8
1 changed files with 0 additions and 5 deletions

View File

@ -103,11 +103,6 @@ Bangle.setUI = (function(mode, cb) {
Bangle.swipeHandler = options.swipe;
Bangle.on("swipe", Bangle.swipeHandler);
}
if (options.btn || options.btnRelease) {
// Make sure we only add the custom btn handlers. TODO: Deliberate on whether this is the right approach or not.
Bangle.btnWatches.forEach(clearWatch);
Bangle.btnWatches = [];
}
if (options.btn) Bangle.btnWatches.push(setWatch(options.btn.bind(options), BTN1, {repeat:1,edge:"rising"}))
if (options.btnRelease) Bangle.btnWatches.push(setWatch(options.btnRelease.bind(options), BTN1, {repeat:1,edge:"falling"}))
if (options.remove) // handler for removing the UI (intervals/etc)