Skip to content

Commit bf53686

Browse files
authored
Merge pull request #4050 from RKBoss6/smartbattwidupdate
[Smart Battery Widget] show alert when below 5%
2 parents 79031df + 6c28d76 commit bf53686

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

apps/widsmartbatt/ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
v0.01: New app!
2+
v0.02: Displays warning '!' if battery is 5 percent or less.

apps/widsmartbatt/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "Smart Battery Widget",
44
"shortName":"Smart Batt Wid",
55
"icon": "icon.png",
6-
"version":"0.01",
6+
"version":"0.02",
77
"type": "widget",
88
"supports": ["BANGLEJS", "BANGLEJS2"],
99
"readme": "README.md",

apps/widsmartbatt/widget.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
: (days >= 1
3030
? Math.round(Math.min(days, 99)) + "d"
3131
: Math.round(hrsLeft) + "h");
32+
if(batt<=5&&!showPercent) txt="!";
3233
if(Bangle.isCharging()) txt=E.getBattery();
3334
let s = 29;
3435
let x = this.x, y = this.y;

0 commit comments

Comments
 (0)