Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Display 'No Alarm Scheduled' Message When No Alarm is Set #440

Merged
merged 3 commits into from
Feb 25, 2024

Conversation

keyurgit45
Copy link
Contributor

Description

Expected behaviour

  1. If an alarm is scheduled, show the remaining time until it rings.
  2. If no alarm is set, display the message "No alarm scheduled" instead of a misleading countdown.

Actual behaviour

  1. If an alarm was scheduled, the remaining time until it rang was displayed.
  2. If the alarm is turned off, after a few seconds, it will show the remaining time until it rings if it was turned on.

Proposed Changes

await Future.delayed(delay); caused alarms to still notify even after being turned off. To fix this, I swapped the Future for a regular Timer. Now, when an alarm's state changes, the timer is cancelled immediately, ensuring "Next alarm" accurately reflects the alarm's true status.

Fixes #284

Checklist

  • Tests have been added or updated to cover the changes
  • Documentation has been updated to reflect the changes
  • Code follows the established coding style guidelines
  • All tests are passing

Display 'No Alarm Scheduled' Message When No Alarm is Set
@keyurgit45 keyurgit45 marked this pull request as draft February 12, 2024 11:04
@keyurgit45 keyurgit45 marked this pull request as ready for review February 12, 2024 11:28
timer was not getting refreshed when stream is being updated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Display "No Alarm Scheduled" Message When No Alarm is Set
2 participants