Skip to content

Fix "Rings On" feature - correct time display for future date alarms Implement Mutually Exclusive Scheduling Options for Alarms #830

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

mahendra-918
Copy link
Contributor

@mahendra-918 mahendra-918 commented Apr 24, 2025

Description

This PR fixes an issue with the "Rings On" feature where the time until the alarm was not correctly displayed for alarms set to future dates. The home screen and alarm settings page now correctly show the proper duration (e.g., "2 days" for an alarm set 2 days in the future).

This PR implements a new scheduling interface that makes alarm scheduling more intuitive by ensuring that "Ring On" (one-time) and "Repeat" (recurring) options are mutually exclusive.

Proposed Changes

-Enhanced timeUntilAlarm() method in Utils class to handle future date alarms with ringOn flag
-Added formatted duration display for multi-day alarms
-Updated all relevant controllers to pass the ringOn and alarmDate parameters
-Added proper time updating when toggling the "Ring On" feature

  • Created a new SchedulingOptionsTile with a tabbed interface for selecting between one-time and recurring alarms
  • Implemented automatic disabling of conflicting scheduling options
  • Added undo functionality when settings are automatically changed
  • Improved the visual design to make it clear which scheduling mode is active
  • Added more intuitive feedback with snackbar notifications

Fixes #827

Screenshots

WhatsApp Image 2025-04-24 at 08 32 28
WhatsApp Image 2025-04-24 at 08 32 29

WhatsApp.Video.2025-04-25.at.02.49.58.mp4

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

@mahendra-918 mahendra-918 changed the title Fix "Rings On" feature - correct time display for future date alarms Fix "Rings On" feature - correct time display for future date alarms new scheduling interface that makes alarm scheduling more intuitive by ensuring that "Ring On" (one-time) and "Repeat" (recurring) options are mutually exclusive. Apr 24, 2025
@mahendra-918 mahendra-918 changed the title Fix "Rings On" feature - correct time display for future date alarms new scheduling interface that makes alarm scheduling more intuitive by ensuring that "Ring On" (one-time) and "Repeat" (recurring) options are mutually exclusive. Fix "Rings On" feature - correct time display for future date alarms Implement Mutually Exclusive Scheduling Options for Alarms Apr 24, 2025
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: The Calculation of timeUntilAlarm is **Not** working as expected when comes to days
1 participant