mirror of https://github.com/espruino/BangleApps
Merge pull request #3041 from bobrippling/backswipe-undefined
backswipe: ignore `undefined` handlerspull/3076/head
commit
a180895ad1
|
@ -1,2 +1,3 @@
|
|||
0.01: New App!
|
||||
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) {
|
||||
return 0;
|
||||
} 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) {
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ "id": "backswipe",
|
||||
"name": "Back Swipe",
|
||||
"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",
|
||||
"icon": "app.png",
|
||||
"tags": "back,gesture,swipe",
|
||||
|
|
Loading…
Reference in New Issue