Skip to content

Commit 58a6fee

Browse files
authored
Merge pull request espruino#3643 from thyttan/backswipe
backswipe: change to prepend swipe listener
2 parents ca01ac8 + 3eb7d19 commit 58a6fee

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

apps/backswipe/ChangeLog

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
0.01: New App!
22
0.02: Don't fire if the app uses swipes already.
33
0.03: Only count defined handlers in the handler array.
4-
0.04: Fix messages auto opened by `messagegui` could not be blacklisted. Needs
5-
a refresh by deselecting and reselecting the "Messages" app throught Back Swipe
6-
settings.
4+
0.04: Fix messages auto opened by `messagegui` could not be blacklisted. Needs a refresh by deselecting and reselecting the "Messages" app throught Back Swipe settings.
5+
0.05: React on swipes before the active app (for the most part) by using `prependListener`.

apps/backswipe/boot.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
// if we're in an app that has a back button, run the callback for it
3939
if (global.BACK && countHandlers("swipe")<=settings.standardNumSwipeHandlers && countHandlers("drag")<=settings.standardNumDragHandlers) {
4040
global.BACK();
41+
E.stopEventPropagation();
4142
}
4243
}
4344
}
@@ -56,5 +57,5 @@
5657
}
5758

5859
// Listen to left to right swipe
59-
Bangle.on("swipe", goBack);
60+
Bangle.prependListener("swipe", goBack);
6061
})();

apps/backswipe/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{ "id": "backswipe",
22
"name": "Back Swipe",
33
"shortName":"BackSwipe",
4-
"version":"0.04",
4+
"version":"0.05",
55
"description": "Service that allows you to use an app's back button using left to right swipe gesture",
66
"icon": "app.png",
77
"tags": "back,gesture,swipe",

0 commit comments

Comments
 (0)