ha: merge conditionals

master
Rob Pilling 2024-04-21 19:32:44 +01:00
parent a610833bd7
commit c0ea3138e5
1 changed files with 8 additions and 11 deletions

View File

@ -71,11 +71,9 @@ 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();
} }
}); });
@ -83,11 +81,10 @@ Bangle.on('touch', function(btn, e){
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.