forked from FOSS/BangleApps
Move initialization into initialize function
parent
0219eeb0ef
commit
4bdf4a0b5c
|
@ -3,4 +3,5 @@
|
|||
0.14: Fix midnight
|
||||
0.15: Fix midnight better
|
||||
0.16: Fix midnight decisively
|
||||
0.17: Get loadWidgets back in the right place
|
||||
0.17: Get loadWidgets back in the right place
|
||||
0.18: Move setUI and loadWidgets to initialize function
|
|
@ -48,6 +48,11 @@ const Y = SCREEN_HEIGHT / 2
|
|||
let date, mins;
|
||||
|
||||
function initialize() {
|
||||
// Tell Bangle this is a clock
|
||||
Bangle.setUI("clock");
|
||||
// Load widgets
|
||||
Bangle.loadWidgets();
|
||||
|
||||
// draw immediately at first
|
||||
tick();
|
||||
|
||||
|
@ -101,12 +106,6 @@ function draw() {
|
|||
g.drawString(bottomLines.join('\n'), SCREEN_WIDTH/2, SCREEN_HEIGHT - BOTTOM_SPACING, false);
|
||||
}
|
||||
|
||||
/* Show launcher when middle button pressed
|
||||
This should be done *before* Bangle.loadWidgets so that
|
||||
widgets know if they're being loaded into a clock app or not */
|
||||
Bangle.setUI("clock");
|
||||
// Load widgets
|
||||
Bangle.loadWidgets();
|
||||
|
||||
if (settings.showWidgets) {
|
||||
Bangle.drawWidgets();
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"name": "Dutch Clock",
|
||||
"shortName":"Dutch Clock",
|
||||
"icon": "app.png",
|
||||
"version":"0.17",
|
||||
"version":"0.18",
|
||||
"description": "A clock that displays the time the way a Dutch person would respond when asked what time it is.",
|
||||
"type": "clock",
|
||||
"tags": "clock,dutch,text",
|
||||
|
|
Loading…
Reference in New Issue