[ClockFace] Fix widget drawing

pull/1979/head
Stiralbios 2022-06-18 15:55:45 +02:00
parent 2aa56bdaf2
commit 621864da24
1 changed files with 3 additions and 2 deletions

View File

@ -58,7 +58,6 @@ ClockFace.prototype.tick = function() {
};
if (!this._last) {
g.clear(true);
if (global.WIDGETS) Bangle.drawWidgets();
g.reset();
this.draw.apply(this, [time, {d: true, h: true, m: true, s: true}]);
} else {
@ -70,6 +69,7 @@ ClockFace.prototype.tick = function() {
g.reset();
this.update.apply(this, [time, c]);
}
if (global.WIDGETS) Bangle.drawWidgets();
this._last = now;
if (this.paused) return; // called redraw() while still paused
// figure out timeout: if e.g. precision=60s, update at the start of a new minute
@ -103,12 +103,13 @@ ClockFace.prototype.pause = function() {
this.paused = true; // apps might want to check this
if (this._pause) this._pause.apply(this);
};
ClockFace.prototype.resume = function() {
if (this._timeout) return; // not paused
delete this._last;
this.paused = false;
if (this._resume) this._resume.apply(this);
this.tick(true);
this.tick();
};
/**