Skip to content

fix: restore dnd on focus pause#43

Merged
PranavPurwar merged 2 commits intoaload0:mainfrom
alv-cor:fix/restore-DND-on-focus_pause
Feb 1, 2026
Merged

fix: restore dnd on focus pause#43
PranavPurwar merged 2 commits intoaload0:mainfrom
alv-cor:fix/restore-DND-on-focus_pause

Conversation

@alv-cor
Copy link
Contributor

@alv-cor alv-cor commented Jan 30, 2026

This pull request primarily focuses on correctly restoring Do Not Disturb (DND) mode and refining the Pomodoro phase transition logic. The changes ensure DND is restored at appropriate times and that Pomodoro transitions are handled more clearly and efficiently.

Focus mode and Pomodoro logic improvements:

  • Restores DND mode immediately when focus mode ends by calling restoreDND() at the end of a session.
  • Refactors Pomodoro phase transition logic to only call transitionPomodoroPhase() if the session is in Pomodoro mode, improving clarity and correctness.

Notification and feedback handling:

  • Ensures DND is restored at the start of a Pomodoro break phase regardless of auto-start settings, and refactors the order and conditions for playing transition sounds and vibrations for better reliability.

Added a call to restoreDND() after disabling focus mode to ensure Do Not Disturb settings are properly restored when focus mode ends.
- Always restore DND (remove conditional on shouldAutoStart).
- Move vibration out of the sound-pref block and increase its duration to 2500ms so vibration occurs independently of sound settings
@PranavPurwar
Copy link
Member

i think we should only toggle the setting when the option is enabled.

@alv-cor
Copy link
Contributor Author

alv-cor commented Jan 31, 2026

i think we should only toggle the setting when the option is enabled.

Thanks for your answer!

According to the app settings, if the toggle is enabled it will Silence notifications during focus, but this is not implemented right currently since breaks in pomodoro or manual pauses in plain focus session are not focus time by meaning, and DND keeps on.

@PranavPurwar PranavPurwar merged commit ec01e04 into aload0:main Feb 1, 2026
1 check passed
@alv-cor alv-cor deleted the fix/restore-DND-on-focus_pause branch February 2, 2026 18:40
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.

2 participants