Skip to content

Commit 1a67d2d

Browse files
author
thyttan
committed
bigclkinfo: add BTN->showLauncher, try fix first draw.
1 parent 130b7ac commit 1a67d2d

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

apps/bigclkinfo/app.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22
// Add setting to decide if the app shoud set Bangle.CLOCK=1 ?
33
// Make an updating analog clock info entry to use as start card. (update clkinfoclk or make a new one?)
44

5-
Bangle.CLOCK = 1; // TODO: make optional.
5+
let isClock = true; // TODO: make optional via setting.
6+
if (isClock) {
7+
Bangle.CLOCK = 1;
8+
setWatch(() => {
9+
Bangle.showLauncher();
10+
}, BTN);
11+
}
612

713
// Load the clock infos
814
let clockInfoItems = require("clock_info").load();
@@ -28,5 +34,5 @@ let clockInfoMenu = require("clock_info").addInteractive(clockInfoItems, {
2834
}
2935
});
3036
clockInfoMenu.menuA = 0;
31-
clockInfoMenu.menuB = 6; // Assume clkinfoclk is at indices (0,6)
32-
clockInfoMenu.redraw();
37+
if (clockInfoItems[0].items[6]) clockInfoMenu.menuB = 6; // Assume clkinfoclk is at indices (0,6)
38+
setTimeout(clockInfoMenu.redraw,0); // Make sure correct item is set before redraw.

0 commit comments

Comments
 (0)