widbatpc fixes

pull/2610/head
Erik Andresen 2023-02-26 10:28:18 +01:00
parent b8e0222315
commit c835650c44
1 changed files with 2 additions and 4 deletions

View File

@ -86,7 +86,7 @@
return changed; return changed;
} }
function draw(fromIntervall) { function draw(fromInterval) {
// if hidden, don't draw // if hidden, don't draw
if (!WIDGETS["batpc"].width) return; if (!WIDGETS["batpc"].width) return;
// else... // else...
@ -104,7 +104,7 @@
} }
} }
if (fromIntervall === true && this.prevLevel === l && this.prevCharging === Bangle.isCharging()) { if (fromInterval === true && this.prevLevel === l && this.prevCharging === Bangle.isCharging()) {
return; // unchanged, do nothing return; // unchanged, do nothing
} }
@ -157,8 +157,6 @@
// can affect the width and mess with the whole widget layout // can affect the width and mess with the whole widget layout
setWidth(); setWidth();
g.clear(); g.clear();
WIDGETS["batpc"].prevLevel = undefined;
WIDGETS["batpc"].prevCharging = undefined;
Bangle.drawWidgets(); Bangle.drawWidgets();
} }