Merge pull request #2306 from halemmerich/quicklaunch

quicklaunch - Respect appRect on touch events
pull/2308/head
Gordon Williams 2022-11-23 10:57:12 +00:00 committed by GitHub
commit 3f6aff95c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View File

@ -5,3 +5,4 @@
0.05: Update to work with new 'fast switch' clock->launcher functionality 0.05: Update to work with new 'fast switch' clock->launcher functionality
0.06: Use Bangle.load() to allow 'fast switch' for apps where it's available. 0.06: Use Bangle.load() to allow 'fast switch' for apps where it's available.
0.07: Revert version 0.06. This version is the same as 0.05. 0.07: Revert version 0.06. This version is the same as 0.05.
0.08: Respect appRect on touch events

View File

@ -8,8 +8,10 @@
storage.write("quicklaunch.json", settings); storage.write("quicklaunch.json", settings);
}; };
Bangle.on("touch", () => { Bangle.on("touch", (_,e) => {
if (!Bangle.CLOCK) return; if (!Bangle.CLOCK) return;
let R = Bangle.appRect;
if (e.x < R.x || e.x > R.x2 || e.y < R.y || e.y > R.y2 ) return;
if (settings.tapapp.src){ if (!storage.read(settings.tapapp.src)) reset("tapapp"); else load(settings.tapapp.src); } if (settings.tapapp.src){ if (!storage.read(settings.tapapp.src)) reset("tapapp"); else load(settings.tapapp.src); }
}); });

View File

@ -2,7 +2,7 @@
"id": "quicklaunch", "id": "quicklaunch",
"name": "Quick Launch", "name": "Quick Launch",
"icon": "app.png", "icon": "app.png",
"version":"0.07", "version":"0.08",
"description": "Tap or swipe left/right/up/down on your clock face to launch up to five apps of your choice. Configurations can be accessed through Settings->Apps.", "description": "Tap or swipe left/right/up/down on your clock face to launch up to five apps of your choice. Configurations can be accessed through Settings->Apps.",
"type": "bootloader", "type": "bootloader",
"tags": "tools, system", "tags": "tools, system",