Resolves issue#827, where timeUntilAlarm
wasn't working as Expected
#833
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.
Description
Now, the alarm scheduling logic incorporates the
alarmDate
parameter into thetimeUntilAlarm
function for the calculation of a non-repeating alarm that's scheduled after some days.Also, you can refer to this small discussion #gsoc-ultimate-alarm-clock > @ 💬, regarding the
Repeat
andRings On
feature, where it was proposed to disable theRings On
when Repeat is enabled, or vice versa.Proposed Changes
Added
alarmDate
Parameter: ThetimeUntilAlarm
function now accepts an additional alarmDate parameter to handle date-based alarm scheduling.Controller Updates: Now, if
Rings On
is enabled orselectedDate != DateTime.now()
, then make theRepeat
as Never orrepeatDays = [false, false, false, false, false, false, false]
. Or, vice versa.Fixes #827
Screenshots
In the video below, the calculation for
Rings in __
is now accurate for alarms set on a specific date. And, selecting both a specific date alarm and a repeat alarm is not possible, since enabling one will disable the other.Record_2025-04-25-01-01-03.mp4
Checklist