Merge pull request #2809 from bobrippling/dtlaunch-back
swiperclocklaunch: remove extra listeners in setUI()master
commit
5fe670cd4b
|
|
@ -2,3 +2,4 @@
|
|||
0.02: Fix issue with mode being undefined
|
||||
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
|
||||
|
|
|
|||
|
|
@ -1,7 +1,13 @@
|
|||
(function() {
|
||||
var sui = Bangle.setUI;
|
||||
var oldSwipe;
|
||||
|
||||
Bangle.setUI = function(mode, cb) {
|
||||
if (oldSwipe && oldSwipe !== Bangle.swipeHandler)
|
||||
Bangle.removeListener("swipe", oldSwipe);
|
||||
sui(mode,cb);
|
||||
oldSwipe = Bangle.swipeHandler;
|
||||
|
||||
if(!mode) return;
|
||||
if ("object"==typeof mode) mode = mode.mode;
|
||||
if (mode.startsWith("clock")) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "swiperclocklaunch",
|
||||
"name": "Swiper Clock Launch",
|
||||
"version": "0.04",
|
||||
"version": "0.05",
|
||||
"description": "Navigate between clock and launcher with Swipe action",
|
||||
"icon": "swiperclocklaunch.png",
|
||||
"type": "bootloader",
|
||||
|
|
|
|||
Loading…
Reference in New Issue