From 9e63a87a546dd6ddd05fbf2d99bcaee1237e45d7 Mon Sep 17 00:00:00 2001 From: Nishant Mishra Date: Wed, 17 Dec 2025 19:39:11 +0530 Subject: [PATCH] fix: minor fixes --- .../viewModel/SettingsViewModel.kt | 17 +++++++---------- app/src/main/res/values/strings.xml | 4 ++-- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/org/nsh07/pomodoro/ui/settingsScreen/viewModel/SettingsViewModel.kt b/app/src/main/java/org/nsh07/pomodoro/ui/settingsScreen/viewModel/SettingsViewModel.kt index 01c0884..3f772f2 100644 --- a/app/src/main/java/org/nsh07/pomodoro/ui/settingsScreen/viewModel/SettingsViewModel.kt +++ b/app/src/main/java/org/nsh07/pomodoro/ui/settingsScreen/viewModel/SettingsViewModel.kt @@ -162,9 +162,6 @@ class SettingsViewModel( viewModelScope.launch(Dispatchers.IO) { serviceHelper.startService(TimerAction.ResetTimer) - focusFlowCollectionJob?.cancel() - shortBreakFlowCollectionJob?.cancel() - longBreakFlowCollectionJob?.cancel() statRepository.deleteAllStats() _settingsState.update { it.copy(isShowingEraseDataDialog = false) @@ -378,13 +375,13 @@ class SettingsViewModel( ) val alarmSoundUri = ( - preferenceRepository.getStringPreference("alarm_sound") - ?: preferenceRepository.saveStringPreference( - "alarm_sound", - (Settings.System.DEFAULT_ALARM_ALERT_URI - ?: Settings.System.DEFAULT_RINGTONE_URI).toString() - ) - ).toUri() + preferenceRepository.getStringPreference("alarm_sound") + ?: preferenceRepository.saveStringPreference( + "alarm_sound", + (Settings.System.DEFAULT_ALARM_ALERT_URI + ?: Settings.System.DEFAULT_RINGTONE_URI).toString() + ) + ).toUri() val theme = preferenceRepository.getStringPreference("theme") ?: preferenceRepository.saveStringPreference("theme", settingsState.theme) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ac12cf3..da46b2d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -113,6 +113,6 @@ Automatically lock your device after a timeout, while keeping the AOD visible Timer reset Undo - Reset data - Are you sure you want to Reset all your data ? + Reset stats + Are you sure you want to reset all your stats? \ No newline at end of file