forked from FOSS/BangleApps
widalarmeta: fix #2542
Fix check for active alarm, either remove brackets or add return for filter in mapmaster
parent
f609c6d9a8
commit
f050b75e5b
|
@ -4,3 +4,4 @@
|
|||
Add option to show seconds
|
||||
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.
|
||||
0.04: Fix check for active alarm
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"id": "widalarmeta",
|
||||
"name": "Alarm & Timer 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).",
|
||||
"icon": "widget.png",
|
||||
"type": "widget",
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
|
||||
function draw() {
|
||||
const times = alarms
|
||||
.map(alarm => {
|
||||
.map(alarm =>
|
||||
alarm.hidden !== true
|
||||
&& require("sched").getTimeToAlarm(alarm)
|
||||
})
|
||||
)
|
||||
.filter(a => a !== undefined);
|
||||
const next = times.length > 0 ? Math.min.apply(null, times) : 0;
|
||||
let calcWidth = 0;
|
||||
|
|
Loading…
Reference in New Issue