diff --git a/Reef/src/main/java/dev/pranav/reef/accessibility/FocusModeService.kt b/Reef/src/main/java/dev/pranav/reef/accessibility/FocusModeService.kt index 5cbb2d5..44bb4ad 100644 --- a/Reef/src/main/java/dev/pranav/reef/accessibility/FocusModeService.kt +++ b/Reef/src/main/java/dev/pranav/reef/accessibility/FocusModeService.kt @@ -195,6 +195,8 @@ class FocusModeService: Service() { prefs.edit { putBoolean("focus_mode", false) } + restoreDND() + updateNotification( title = getNotificationTitle(), text = formatTime(state.timeRemaining), @@ -268,10 +270,11 @@ class FocusModeService: Service() { if (!state.isPomodoroMode) { endSession() - return + } else { + transitionPomodoroPhase() } - transitionPomodoroPhase() + } private fun endSession() { @@ -339,18 +342,17 @@ class FocusModeService: Service() { showBreakEndedNotification() } } else { - if (!shouldAutoStart) { - restoreDND() - } + restoreDND() } if (prefs.getBoolean("pomodoro_sound_enabled", true)) { - if (prefs.getBoolean("pomodoro_vibration_enabled", true)) { - AndroidUtilities.vibrate(this, 1000) - } playTransitionSound() } + if (prefs.getBoolean("pomodoro_vibration_enabled", true)) { + AndroidUtilities.vibrate(this, 1000) + } + val notificationText = if (shouldAutoStart) { getString(R.string.time_remaining, formatTime(nextPhase.duration)) } else {