master
Gordon Williams 2022-05-23 10:25:31 +01:00
parent 5e4ad094e7
commit 778432e945
1 changed files with 5 additions and 2 deletions

View File

@ -66,7 +66,10 @@ ClockFace.prototype.tick = function() {
}; };
ClockFace.prototype.start = function() { ClockFace.prototype.start = function() {
Bangle.CLOCK = 1; /* Some widgets want to know if we're in a clock or not (like chrono, widget clock, etc). Normally
.CLOCK is set by Bangle.setUI('clock') but we want to load widgets so we can check appRect and *then*
call setUI. see #1864 */
Bangle.CLOCK = 1;
Bangle.loadWidgets(); Bangle.loadWidgets();
if (this.init) this.init.apply(this); if (this.init) this.init.apply(this);
if (this._upDown) Bangle.setUI("clockupdown", d=>this._upDown.apply(this,[d])); if (this._upDown) Bangle.setUI("clockupdown", d=>this._upDown.apply(this,[d]));
@ -104,4 +107,4 @@ ClockFace.prototype.redraw = function() {
this.tick(); this.tick();
}; };
exports = ClockFace; exports = ClockFace;