Skip to content

Commit 79dcbd7

Browse files
authored
Remove outdated update changes
1 parent 751af4a commit 79dcbd7

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

apps/widsmartbatt/widget.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
(function(){
2-
3-
const intervalLow = 30000; // update interval when not charging
4-
const intervalHigh = 30000; // faster update when charging
2+
53
var showPercent = false;
64
const width = 40;
75
const height = 24;
@@ -57,8 +55,7 @@
5755
g.setFont('6x8');
5856
g.drawString(txt, x + 14, y + 10);
5957

60-
if (Bangle.isCharging()) changeInterval(id, intervalHigh);
61-
else changeInterval(id, intervalLow);
58+
6259
}
6360
WIDGETS["widsmartbatt"] = {
6461
area: "tr",
@@ -80,6 +77,7 @@
8077
if (w.x - oversize <= x && x < w.x + width + oversize
8178
&& w.y - oversize <= y && y < w.y + height + oversize) {
8279
E.stopEventPropagation && E.stopEventPropagation();
80+
Bangle.buzz(20);
8381
showPercent = true;
8482
setTimeout(() => {
8583
showPercent = false;
@@ -93,8 +91,8 @@
9391
Bangle.on('charging', function () {
9492
WIDGETS["widsmartbatt"].draw();
9593
});
96-
97-
var id = setInterval(() => WIDGETS["widsmartbatt"].draw(), intervalLow);
94+
//draw once per minute...
95+
var id = setInterval(() => WIDGETS["widsmartbatt"].draw(), 60000);
9896

9997

10098
})();

0 commit comments

Comments
 (0)