From 3452d67f42285f96b6c5305f073ae2b76db8b938 Mon Sep 17 00:00:00 2001 From: Rob Pilling Date: Wed, 23 Oct 2024 21:19:56 +0100 Subject: [PATCH] sched/clkinfo: reset `last` when activating an alarm ```json { "t": 23940000, "del": false, "on": true, "rp": false, "as": false, "dow": 127, "last": 23, "vibrate": "::", "msg": "" } ``` --- apps/sched/ChangeLog | 1 + apps/sched/clkinfo.js | 1 + apps/sched/metadata.json | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/sched/ChangeLog b/apps/sched/ChangeLog index 2ecbb9a943..39e26a1168 100644 --- a/apps/sched/ChangeLog +++ b/apps/sched/ChangeLog @@ -29,3 +29,4 @@ 0.26: Fix hitting snooze on an alarm after when the snooze would've fired 0.27: Tapping clkinfo enables/disables the selected alarm 0.28: Added an icon for disabled events +0.29: Fix possible bug in toggling an alarm to on, from clkinfo diff --git a/apps/sched/clkinfo.js b/apps/sched/clkinfo.js index 73ba4a259d..92dd6c4fd5 100644 --- a/apps/sched/clkinfo.js +++ b/apps/sched/clkinfo.js @@ -135,6 +135,7 @@ run: function() { if (a.date) return; // ignore events a.on = !a.on; + a.last = 0; if(a.on && a.timer) alarm.resetTimer(a); this.emit("redraw"); alarm.setAlarms(all); diff --git a/apps/sched/metadata.json b/apps/sched/metadata.json index 4141c77976..274b83d146 100644 --- a/apps/sched/metadata.json +++ b/apps/sched/metadata.json @@ -1,7 +1,7 @@ { "id": "sched", "name": "Scheduler", - "version": "0.28", + "version": "0.29", "description": "Scheduling library for alarms and timers", "icon": "app.png", "type": "scheduler",