remove only specific listeners
parent
a3f77de725
commit
cbdb072054
|
|
@ -5,3 +5,5 @@ Addict.
|
||||||
0.04: New layout.
|
0.04: New layout.
|
||||||
0.05: Add widget field, tweak layout.
|
0.05: Add widget field, tweak layout.
|
||||||
0.06: Add compatibility with Fastload Utils.
|
0.06: Add compatibility with Fastload Utils.
|
||||||
|
0.07: Remove just the specific listeners to not interfere with Quick Launch
|
||||||
|
when fastloading.
|
||||||
|
|
|
||||||
|
|
@ -116,11 +116,11 @@ let touchHandler = function(_, xy) {
|
||||||
y = xy.y;
|
y = xy.y;
|
||||||
len = (R.w<R.h+1)?(R.w/3):(R.h/3);
|
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)) {
|
if ((R.x-1<x && x<R.x+len) && (R.y-1<y && y<R.y+len)) {
|
||||||
//Menu
|
//Menu
|
||||||
Bangle.removeAllListeners("touch");
|
Bangle.removeListener("touch", touchHandler);
|
||||||
Bangle.removeAllListeners("swipe");
|
Bangle.removeListener("swipe", swipeHandler);
|
||||||
backToMenu = true;
|
backToMenu = true;
|
||||||
E.showMenu(paMenu);
|
E.showMenu(paMenu);
|
||||||
} else if ((R.x-1<x && x<R.x+len) && (R.y2-len<y && y<R.y2+1)) {
|
} 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();
|
gadgetbridgeWake();
|
||||||
} else if ((R.x2-len<x && x<R.x2+1) && (R.y-1<y && y<R.y+len)) {
|
} else if ((R.x2-len<x && x<R.x2+1) && (R.y-1<y && y<R.y+len)) {
|
||||||
//Srch
|
//Srch
|
||||||
Bangle.removeAllListeners("touch");
|
Bangle.removeListener("touch", touchHandler);
|
||||||
Bangle.removeAllListeners("swipe");
|
Bangle.removeListener("swipe", swipeHandler);
|
||||||
E.showMenu(searchMenu);
|
E.showMenu(searchMenu);
|
||||||
} else if ((R.x2-len<x && x<R.x2+1) && (R.y2-len<y && y<R.y2+1)) {
|
} else if ((R.x2-len<x && x<R.x2+1) && (R.y2-len<y && y<R.y2+1)) {
|
||||||
//Speed
|
//Speed
|
||||||
Bangle.removeAllListeners("touch");
|
Bangle.removeListener("touch", touchHandler);
|
||||||
Bangle.removeAllListeners("swipe");
|
Bangle.removeListener("swipe", swipeHandler);
|
||||||
E.showMenu(speedMenu);
|
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)) {
|
} 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
|
//Previous
|
||||||
|
|
@ -248,8 +248,6 @@ let backToGfx = function() {
|
||||||
E.showMenu();
|
E.showMenu();
|
||||||
g.clear();
|
g.clear();
|
||||||
g.reset();
|
g.reset();
|
||||||
Bangle.removeAllListeners("touch");
|
|
||||||
Bangle.removeAllListeners("swipe");
|
|
||||||
setUI();
|
setUI();
|
||||||
gfx();
|
gfx();
|
||||||
backToMenu = false;
|
backToMenu = false;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
"id": "podadrem",
|
"id": "podadrem",
|
||||||
"name": "Podcast Addict Remote",
|
"name": "Podcast Addict Remote",
|
||||||
"shortName": "PA Remote",
|
"shortName": "PA Remote",
|
||||||
"version": "0.06",
|
"version": "0.07",
|
||||||
"description": "Control Podcast Addict on your android device.",
|
"description": "Control Podcast Addict on your android device.",
|
||||||
"readme": "README.md",
|
"readme": "README.md",
|
||||||
"type": "app",
|
"type": "app",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue