[ptlaunch] Add setUI custom clock recognition

Update boot.js to support clocks in custom setUI mode, started with: `Bangle.setUI({ mode: "custom", clock: 1, ... });
pull/2112/head
storm64 2022-09-06 12:15:52 +02:00
parent 425930f2ec
commit f6640e10ce
3 changed files with 4 additions and 8 deletions

View File

@ -6,3 +6,4 @@
0.12: Improve pattern detection code readability by PaddeK http://forum.espruino.com/profiles/117930/
0.13: Improve pattern rendering by HughB http://forum.espruino.com/profiles/167235/
0.14: Update setUI to work with new Bangle.js 2v13 menu style
0.15: Update to support clocks in custom setUI mode

View File

@ -76,13 +76,8 @@
var sui = Bangle.setUI;
Bangle.setUI = function (mode, cb) {
sui(mode, cb);
if ("object"==typeof mode) mode = mode.mode;
if (!mode) {
Bangle.removeListener("drag", dragHandler);
storedPatterns = {};
return;
}
if (!mode.startsWith("clock")) {
if (typeof mode === "object") mode = { mode: mode };
if (!mode || !(mode.clock || mode.startsWith("clock"))) {
storedPatterns = {};
Bangle.removeListener("drag", dragHandler);
return;

View File

@ -2,7 +2,7 @@
"id": "ptlaunch",
"name": "Pattern Launcher",
"shortName": "Pattern Launcher",
"version": "0.14",
"version": "0.15",
"description": "Directly launch apps from the clock screen with custom patterns.",
"icon": "app.png",
"screenshots": [{"url":"manage_patterns_light.png"}],