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": ""
}
```
pull/3620/head
Rob Pilling 2024-10-23 21:19:56 +01:00
parent c893bc849f
commit 3452d67f42
3 changed files with 3 additions and 1 deletions

View File

@ -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

View File

@ -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);

View File

@ -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",