Skip to content

Commit

Permalink
swiperclocklaunch: check mode after pulling from options
Browse files Browse the repository at this point in the history
  • Loading branch information
bobrippling committed Jul 10, 2023
1 parent edfb900 commit c36e358
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions apps/swiperclocklaunch/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
0.03: Update setUI to work with new Bangle.js 2v13 menu style
0.04: Update to work with new 'fast switch' clock->launcher functionality
0.05: Keep track of event listeners we "overwrite", and remove them at the start of setUI
0.06: Handle apps that call setUI({}) to reset
3 changes: 2 additions & 1 deletion apps/swiperclocklaunch/boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
sui(mode,cb);
oldSwipe = Bangle.swipeHandler;

if(!mode) return;
if ("object"==typeof mode) mode = mode.mode;
if (!mode) return;

if (mode.startsWith("clock")) {
// clock -> launcher
Bangle.swipeHandler = dir => { if (dir<0) Bangle.showLauncher(); };
Expand Down
2 changes: 1 addition & 1 deletion apps/swiperclocklaunch/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "swiperclocklaunch",
"name": "Swiper Clock Launch",
"version": "0.05",
"version": "0.06",
"description": "Navigate between clock and launcher with Swipe action",
"icon": "swiperclocklaunch.png",
"type": "bootloader",
Expand Down

0 comments on commit c36e358

Please sign in to comment.