[Alarms & Timers] Avoid time reset after a dow change

master
Alessandro Cocco 2022-04-21 11:15:49 +02:00
parent 944cbb1136
commit 85268b8f82
3 changed files with 7 additions and 2 deletions

View File

@ -19,3 +19,4 @@
0.18: Cope with >1 identical alarm at once (#1667)
0.19: Ensure rescheduled alarms that already fired have 'last' reset
0.20: Use the new 'sched' factories to initialize new alarms/timers
0.21: Fix time reset after a day of week change (#1676)

View File

@ -119,7 +119,11 @@ function editAlarm(alarmIndex, alarm) {
},
/*LANG*/'Days': {
value: "SMTWTFS".split("").map((d,n)=>a.dow&(1<<n)?d:".").join(""),
onchange: () => editDOW(a.dow, d=>{a.dow=d;editAlarm(alarmIndex,a)})
onchange: () => editDOW(a.dow, d => {
a.dow = d;
a.t = encodeTime(t);
editAlarm(alarmIndex, a);
})
},
/*LANG*/'Vibrate': require("buzz_menu").pattern(a.vibrate, v => a.vibrate=v ),
/*LANG*/'Auto Snooze': {

View File

@ -2,7 +2,7 @@
"id": "alarm",
"name": "Alarms & Timers",
"shortName": "Alarms",
"version": "0.20",
"version": "0.21",
"description": "Set alarms and timers on your Bangle",
"icon": "app.png",
"tags": "tool,alarm,widget",