2021-10-22 14:56:20 +00:00
|
|
|
(function() {
|
2022-11-04 14:10:18 +00:00
|
|
|
var sui = Bangle.setUI;
|
2023-06-11 13:36:40 +00:00
|
|
|
var oldSwipe;
|
|
|
|
|
2022-11-04 14:10:18 +00:00
|
|
|
Bangle.setUI = function(mode, cb) {
|
2024-07-04 11:18:30 +00:00
|
|
|
if (oldSwipe) {
|
2023-06-11 13:36:40 +00:00
|
|
|
Bangle.removeListener("swipe", oldSwipe);
|
2024-07-04 11:18:30 +00:00
|
|
|
oldSwipe = undefined;
|
|
|
|
}
|
|
|
|
|
2022-11-04 14:10:18 +00:00
|
|
|
sui(mode,cb);
|
2023-06-11 13:36:40 +00:00
|
|
|
|
2024-07-03 11:07:45 +00:00
|
|
|
if (Bangle.CLOCK) {
|
2022-11-04 14:10:18 +00:00
|
|
|
// clock -> launcher
|
2024-07-04 11:18:30 +00:00
|
|
|
oldSwipe = dir => { if (dir<0) Bangle.showLauncher(); };
|
|
|
|
Bangle.on("swipe", oldSwipe);
|
2024-07-03 11:07:45 +00:00
|
|
|
} else if (global.__FILE__ && __FILE__.endsWith(".app.js") && (require("Storage").readJSON(__FILE__.slice(0,-6)+"info",1)||{}).type==="launch") {
|
|
|
|
// launcher -> clock
|
2024-07-04 11:18:30 +00:00
|
|
|
oldSwipe = dir => { if (dir>0) load(); };
|
|
|
|
Bangle.on("swipe", oldSwipe);
|
2021-10-22 14:56:20 +00:00
|
|
|
}
|
2022-11-04 14:10:18 +00:00
|
|
|
};
|
|
|
|
})();
|