multitimer: handle undefined alarm.data

pull/3379/head
Rob Pilling 2024-04-22 18:38:44 +01:00
parent 0a097dd031
commit 76c296f44d
3 changed files with 4 additions and 2 deletions

View File

@ -8,3 +8,5 @@
menu display/fastload removes it
0.08: Add setting for initial page to display
0.09: Minor code improvements
0.10: Handle missing alarm data, e.g. when our reset is fired from
non-multitimer alarms

View File

@ -1,6 +1,6 @@
{
const resetTimer = alarm => {
if (alarm.timer) alarm.timer = alarm.data.ot;
if (alarm.timer && "ot" in alarm.data) alarm.timer = alarm.data.ot;
};
Bangle.on("alarmSnooze", resetTimer);

View File

@ -1,7 +1,7 @@
{
"id": "multitimer",
"name": "Multi Timer",
"version": "0.09",
"version": "0.10",
"description": "Set timers and chronographs (stopwatches) and watch them count down in real time. Pause, create, edit, and delete timers and chronos, and add custom labels/messages. Also sets alarms.",
"icon": "app.png",
"screenshots": [