feat(alarms): swipe to delete, with Undo

An alarm card swipes away towards the end edge, or deletes from its
"Delete" accessibility action, and the list's snackbar offers Undo.
The editor's Delete drops its confirmation for the same Undo, routed
through a singleton so the list can answer it after the editor pops.
Timer cards get the same Undo for their corner delete.

AlarmEngine.delete stops a ringing alarm and clears a snoozed one's
notification under the engine lock; restore puts the row back under
its own id with its ring state and reschedules. A ringing alarm comes
back dismissed, never ringing; a finished timer comes back reset.

The swipe is hand-rolled so the end-to-start drag stays with the tab
pager.

Fixes #20
This commit is contained in:
makiolaj committed 2026-10-21 20:02:00 +02:00
1 parent 3f431a7f32
commit 2feed2ee35
34 files changed
+1074 -114

No files matched your search

+3 -2
View File
@@ -65,6 +65,7 @@
<string name="timer_editor_sound">Sound</string>
<string name="timer_editor_delete">Delete timer</string>
<string name="timer_editor_delete_confirm">Delete this timer?</string>
<string name="timer_deleted">Timer deleted</string>
<!-- M6: the timer notification. One channel, one id, however many timers. -->
<string name="channel_timers_name">Timers</string>
@@ -135,9 +136,9 @@
<string name="editor_snooze_limit">Snooze limit</string>
<string name="editor_dismiss_challenge">To dismiss</string>
<string name="editor_delete">Delete alarm</string>
<string name="editor_delete_title">Delete this alarm?</string>
<string name="editor_delete_message">The %1$s alarm will be removed.</string>
<string name="alarm_deleted">%1$s alarm deleted</string>
<string name="action_delete">Delete</string>
<string name="action_undo">Undo</string>
<string name="action_cancel">Cancel</string>
<string name="action_ok">OK</string>