Skip to content

Commit

Permalink
miclock2: first setui, then widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
nxdefiant committed Jul 25, 2023
1 parent 09cc9f2 commit d055156
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions apps/miclock2/clock-mixed.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ const setLineWidth = function(x1, y1, x2, y2, lw) {
};

const drawMixedClock = function() {
"ram";
const date = new Date();
const dateArray = date.toString().split(" ");
const isEn = locale.name.startsWith("en");
Expand Down Expand Up @@ -113,11 +112,6 @@ const onLCDPower = function(on) {
};
Bangle.on('lcdPower', onLCDPower);

g.clear();
Bangle.loadWidgets();
Bangle.drawWidgets();
drawMixedClock(); // immediately draw

Bangle.setUI({mode:"clock", remove:function() {
if (timeoutId !== undefined) {
delete buf.buffer;
Expand All @@ -126,4 +120,9 @@ Bangle.setUI({mode:"clock", remove:function() {
Bangle.removeListener('lcdPower',onLCDPower);
}
}});

g.clear();
Bangle.loadWidgets();
Bangle.drawWidgets();
drawMixedClock(); // immediately draw
}

0 comments on commit d055156

Please sign in to comment.