Merge pull request #3041 from bobrippling/backswipe-undefined
backswipe: ignore `undefined` handlersmaster
commit
a180895ad1
|
|
@ -1,2 +1,3 @@
|
||||||
0.01: New App!
|
0.01: New App!
|
||||||
0.02: Don't fire if the app uses swipes already.
|
0.02: Don't fire if the app uses swipes already.
|
||||||
|
0.03: Only count defined handlers in the handler array.
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
if (Bangle["#on"+eventType] === undefined) {
|
if (Bangle["#on"+eventType] === undefined) {
|
||||||
return 0;
|
return 0;
|
||||||
} else if (Bangle["#on"+eventType] instanceof Array) {
|
} else if (Bangle["#on"+eventType] instanceof Array) {
|
||||||
return Bangle["#on"+eventType].length;
|
return Bangle["#on"+eventType].filter(x=>x).length;
|
||||||
} else if (Bangle["#on"+eventType] !== undefined) {
|
} else if (Bangle["#on"+eventType] !== undefined) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{ "id": "backswipe",
|
{ "id": "backswipe",
|
||||||
"name": "Back Swipe",
|
"name": "Back Swipe",
|
||||||
"shortName":"BackSwipe",
|
"shortName":"BackSwipe",
|
||||||
"version":"0.02",
|
"version":"0.03",
|
||||||
"description": "Service that allows you to use an app's back button using left to right swipe gesture",
|
"description": "Service that allows you to use an app's back button using left to right swipe gesture",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"tags": "back,gesture,swipe",
|
"tags": "back,gesture,swipe",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue