forked from FOSS/BangleApps
swiper 0.04: Update to work with new 'fast switch' clock->launcher functionality
parent
73cbbb21df
commit
45eb06fbd1
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
Bangle.swipeHandler = dir => { if (dir<0) Bangle.showLauncher(); };
|
||||
Bangle.on("swipe", Bangle.swipeHandler);
|
||||
};
|
||||
})();
|
||||
// launcher -> clock
|
||||
setTimeout(function() {
|
||||
if (global.__FILE__ && __FILE__.endsWith(".app.js") && (require("Storage").readJSON(__FILE__.slice(0,-6)+"info",1)||{}).type=="launch") {
|
||||
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")) {
|
||||
// clock -> launcher
|
||||
Bangle.swipeHandler = dir => { if (dir<0) Bangle.showLauncher(); };
|
||||
Bangle.on("swipe", Bangle.swipeHandler);
|
||||
} 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);
|
||||
};
|
||||
})();
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue