fix: minor fixes

This commit is contained in:
Nishant Mishra
2025-12-17 19:39:11 +05:30
parent 24a0b71427
commit 9e63a87a54
2 changed files with 9 additions and 12 deletions

View File

@@ -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)

View File

@@ -113,6 +113,6 @@
<string name="secure_aod_desc">Automatically lock your device after a timeout, while keeping the AOD visible</string>
<string name="timer_reset_message">Timer reset</string>
<string name="undo">Undo</string>
<string name="reset_data">Reset data</string>
<string name="reset_data_dialog_text">Are you sure you want to Reset all your data ?</string>
<string name="reset_data">Reset stats</string>
<string name="reset_data_dialog_text">Are you sure you want to reset all your stats?</string>
</resources>