setuichange: don't claer BTN watches
after trying it seemed like it was not necessary.master
parent
fb7bc5d88f
commit
eaa2918bc8
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue