mirror of https://github.com/espruino/BangleApps
widalarmeta: don't show for hidden alarms
parent
bddef2ef0f
commit
70a4371cf4
|
@ -8,7 +8,12 @@
|
|||
}, require("Storage").readJSON("widalarmeta.json",1) || {});
|
||||
|
||||
function draw() {
|
||||
const times = alarms.map(alarm => require("sched").getTimeToAlarm(alarm)).filter(a => a !== undefined);
|
||||
const times = alarms
|
||||
.map(alarm => {
|
||||
alarm.hidden !== true
|
||||
&& require("sched").getTimeToAlarm(alarm)
|
||||
})
|
||||
.filter(a => a !== undefined);
|
||||
const next = Math.min.apply(null, times);
|
||||
let calcWidth = 0;
|
||||
let drawSeconds = false;
|
||||
|
|
Loading…
Reference in New Issue