forked from FOSS/BangleApps
commit
5fa45d5d4b
|
@ -4,3 +4,4 @@
|
||||||
Add option to show seconds
|
Add option to show seconds
|
||||||
0.03: Fix Bell not appearing on alarms > 24h and redrawing interval
|
0.03: Fix Bell not appearing on alarms > 24h and redrawing interval
|
||||||
Update to match the default alarm widget, and not show itself when an alarm is hidden.
|
Update to match the default alarm widget, and not show itself when an alarm is hidden.
|
||||||
|
0.04: Fix check for active alarm
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"id": "widalarmeta",
|
"id": "widalarmeta",
|
||||||
"name": "Alarm & Timer ETA",
|
"name": "Alarm & Timer ETA",
|
||||||
"shortName": "Alarm ETA",
|
"shortName": "Alarm ETA",
|
||||||
"version": "0.03",
|
"version": "0.04",
|
||||||
"description": "A widget that displays the time to the next Alarm or Timer in hours and minutes, maximum 24h (configurable).",
|
"description": "A widget that displays the time to the next Alarm or Timer in hours and minutes, maximum 24h (configurable).",
|
||||||
"icon": "widget.png",
|
"icon": "widget.png",
|
||||||
"type": "widget",
|
"type": "widget",
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
|
|
||||||
function draw() {
|
function draw() {
|
||||||
const times = alarms
|
const times = alarms
|
||||||
.map(alarm => {
|
.map(alarm =>
|
||||||
alarm.hidden !== true
|
alarm.hidden !== true
|
||||||
&& require("sched").getTimeToAlarm(alarm)
|
&& require("sched").getTimeToAlarm(alarm)
|
||||||
})
|
)
|
||||||
.filter(a => a !== undefined);
|
.filter(a => a !== undefined);
|
||||||
const next = times.length > 0 ? Math.min.apply(null, times) : 0;
|
const next = times.length > 0 ? Math.min.apply(null, times) : 0;
|
||||||
let calcWidth = 0;
|
let calcWidth = 0;
|
||||||
|
|
Loading…
Reference in New Issue