Skip to content

Commit

Permalink
feat: auto enable alarms when updating
Browse files Browse the repository at this point in the history
  • Loading branch information
SuhasDissa authored and Bnyro committed Oct 31, 2024
1 parent 8ea476c commit 0e3fe4c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class CreateUpdateDeleteAlarmUseCase(
}

suspend fun updateAlarm(alarm: Alarm) {
alarm.enabled = true
AlarmHelper.enqueue(context, alarm)
alarmRepository.updateAlarm(alarm)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ fun AlarmPickerScreen(onNavigateBack: () -> Unit) {
} else {
//Update Alarm
viewModel.updateAlarm(alarm)
if (alarm.enabled) {
viewModel.createToast(alarm, context)
}
viewModel.createToast(alarm, context)
}
onNavigateBack.invoke()
})
Expand Down

0 comments on commit 0e3fe4c

Please sign in to comment.