2021-10-22 14:56:20 +00:00
|
|
|
// clock -> launcher
|
|
|
|
(function() {
|
|
|
|
var sui = Bangle.setUI;
|
|
|
|
Bangle.setUI = function(mode, cb) {
|
|
|
|
sui(mode,cb);
|
2021-11-20 20:47:58 +00:00
|
|
|
if(!mode) return;
|
2022-02-24 11:33:05 +00:00
|
|
|
if ("object"==typeof mode) mode = mode.mode;
|
2021-11-20 20:47:58 +00:00
|
|
|
if (!mode.startsWith("clock")) return;
|
2021-10-22 14:56:20 +00:00
|
|
|
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") {
|
|
|
|
Bangle.swipeHandler = dir => { if (dir>0) load(); };
|
|
|
|
Bangle.on("swipe", Bangle.swipeHandler);
|
|
|
|
}
|
2021-11-20 04:59:58 +00:00
|
|
|
}, 10);
|