Merge pull request #2364 from thyttan/podcast-addict

[Podcast Addict Remote] remove only specific listeners
pull/2369/head
Gordon Williams 2022-12-06 11:53:06 +00:00 committed by GitHub
commit 4ca2add2ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 10 deletions

View File

@ -5,3 +5,5 @@ Addict.
0.04: New layout.
0.05: Add widget field, tweak layout.
0.06: Add compatibility with Fastload Utils.
0.07: Remove just the specific listeners to not interfere with Quick Launch
when fastloading.

View File

@ -116,11 +116,11 @@ let touchHandler = function(_, xy) {
y = xy.y;
len = (R.w<R.h+1)?(R.w/3):(R.h/3);
// doing a<b+1 seemed faster than a<=b, also using a>b-1 instead of a>b.
// doing a<b+1 seemed faster than a<=b, also using a>b-1 instead of a>=b.
if ((R.x-1<x && x<R.x+len) && (R.y-1<y && y<R.y+len)) {
//Menu
Bangle.removeAllListeners("touch");
Bangle.removeAllListeners("swipe");
Bangle.removeListener("touch", touchHandler);
Bangle.removeListener("swipe", swipeHandler);
backToMenu = true;
E.showMenu(paMenu);
} else if ((R.x-1<x && x<R.x+len) && (R.y2-len<y && y<R.y2+1)) {
@ -129,13 +129,13 @@ let touchHandler = function(_, xy) {
gadgetbridgeWake();
} else if ((R.x2-len<x && x<R.x2+1) && (R.y-1<y && y<R.y+len)) {
//Srch
Bangle.removeAllListeners("touch");
Bangle.removeAllListeners("swipe");
Bangle.removeListener("touch", touchHandler);
Bangle.removeListener("swipe", swipeHandler);
E.showMenu(searchMenu);
} else if ((R.x2-len<x && x<R.x2+1) && (R.y2-len<y && y<R.y2+1)) {
//Speed
Bangle.removeAllListeners("touch");
Bangle.removeAllListeners("swipe");
Bangle.removeListener("touch", touchHandler);
Bangle.removeListener("swipe", swipeHandler);
E.showMenu(speedMenu);
} else if ((R.x-1<x && x<R.x+len) && (R.y+R.h/2-len/2<y && y<R.y+R.h/2+len/2)) {
//Previous
@ -248,8 +248,6 @@ let backToGfx = function() {
E.showMenu();
g.clear();
g.reset();
Bangle.removeAllListeners("touch");
Bangle.removeAllListeners("swipe");
setUI();
gfx();
backToMenu = false;

View File

@ -2,7 +2,7 @@
"id": "podadrem",
"name": "Podcast Addict Remote",
"shortName": "PA Remote",
"version": "0.06",
"version": "0.07",
"description": "Control Podcast Addict on your android device.",
"readme": "README.md",
"type": "app",