ha: merge conditionals

pull/3375/head
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,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.