swiper 0.04: Update to work with new 'fast switch' clock->launcher functionality

pull/2232/head
Gordon Williams 2022-11-04 14:10:18 +00:00
parent 73cbbb21df
commit 45eb06fbd1
3 changed files with 17 additions and 16 deletions

View File

@ -1,3 +1,4 @@
0.01: New App!
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

View File

@ -1,19 +1,19 @@
// clock -> launcher
(function() {
var sui = Bangle.setUI;
Bangle.setUI = function(mode, cb) {
sui(mode,cb);
if(!mode) return;
if ("object"==typeof mode) mode = mode.mode;
if (!mode.startsWith("clock")) return;
if (mode.startsWith("clock")) {
// clock -> launcher
Bangle.swipeHandler = dir => { if (dir<0) Bangle.showLauncher(); };
Bangle.on("swipe", Bangle.swipeHandler);
};
})();
// launcher -> clock
setTimeout(function() {
} else {
if (global.__FILE__ && __FILE__.endsWith(".app.js") && (require("Storage").readJSON(__FILE__.slice(0,-6)+"info",1)||{}).type=="launch") {
// launcher -> clock
Bangle.swipeHandler = dir => { if (dir>0) load(); };
Bangle.on("swipe", Bangle.swipeHandler);
}
}, 10);
}
};
})();

View File

@ -1,7 +1,7 @@
{
"id": "swiperclocklaunch",
"name": "Swiper Clock Launch",
"version": "0.03",
"version": "0.04",
"description": "Navigate between clock and launcher with Swipe action",
"icon": "swiperclocklaunch.png",
"type": "bootloader",