Merge pull request #1723 from alessandrococco/1676-on-new-alarm-time-is-reset-on-dow-change

[Alarms & Timers] Fix #1676
pull/1722/head
Gordon Williams 2022-04-21 10:38:40 +01:00 committed by GitHub
commit fbdcb8da83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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.18: Cope with >1 identical alarm at once (#1667)
0.19: Ensure rescheduled alarms that already fired have 'last' reset 0.19: Ensure rescheduled alarms that already fired have 'last' reset
0.20: Use the new 'sched' factories to initialize new alarms/timers 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': { /*LANG*/'Days': {
value: "SMTWTFS".split("").map((d,n)=>a.dow&(1<<n)?d:".").join(""), 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*/'Vibrate': require("buzz_menu").pattern(a.vibrate, v => a.vibrate=v ),
/*LANG*/'Auto Snooze': { /*LANG*/'Auto Snooze': {

View File

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