Repository navigation
Switch an alarm on when its time is changed - #5
Merged
Merged
Conversation
Setting a time is how you set an alarm, so picking a new one on a switched-off alarm and leaving it off just means it silently doesn't ring. The stock Clock app enables on edit for the same reason. The quick time popup always enables, since changing the time is the only thing it does. The full editor sheet enables only when the time actually changed: that sheet has no on/off switch of its own - it lives on the list row - so saving after merely renaming a switched-off alarm must not quietly turn it on. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01C7x8v5c5Lu29PBWy1LdfCe
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Setting a time is how you set an alarm. Picking a new one on a switched-off alarm and leaving it off just means it silently doesn't ring — which is never what was meant. The stock Clock app enables on edit for the same reason, so this isn't a surprising behaviour to adopt.
Behaviour
The distinction on the editor is deliberate: that sheet has no on/off switch of its own (it lives on the list row, and the sheet's only switches are Vibrate and Fade-in), so saving after merely renaming or re-tagging a switched-off alarm must not quietly turn it on.
AlarmEditorViewModelkeeps the time the alarm had when the sheet opened and compares against it.Nothing here can override a deliberate off — the only way to switch an alarm off is the list row, and that still wins unless you change the time afterwards.
Not verified
Uncompiled here —
./gradlew assembleDebugfirst.Generated by Claude Code