mirror of https://github.com/espruino/BangleApps
ha: merge conditionals
parent
a610833bd7
commit
c0ea3138e5
|
@ -71,23 +71,20 @@ Bangle.on('touch', function(btn, e){
|
||||||
|
|
||||||
if(isLeft){
|
if(isLeft){
|
||||||
toLeft();
|
toLeft();
|
||||||
}
|
}else if (isRight){
|
||||||
if(isRight){
|
|
||||||
toRight();
|
toRight();
|
||||||
}
|
}else{
|
||||||
if(!isRight && !isLeft){
|
|
||||||
sendTrigger();
|
sendTrigger();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Bangle.on("swipe", (lr,ud) => {
|
Bangle.on("swipe", (lr,ud) => {
|
||||||
if (lr == -1) {
|
if (lr == -1) {
|
||||||
toLeft();
|
toLeft();
|
||||||
}
|
} else if (lr == 1) {
|
||||||
if (lr == 1) {
|
toRight();
|
||||||
toRight();
|
}
|
||||||
}
|
});
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// Send intent that the we started the app.
|
// Send intent that the we started the app.
|
||||||
|
|
Loading…
Reference in New Issue