diff --git a/app/src/main/java/io/github/kirasok/alarmix/presentation/receiver/AlarmService.kt b/app/src/main/java/io/github/kirasok/alarmix/presentation/receiver/AlarmService.kt index c209bee..80acae1 100644 --- a/app/src/main/java/io/github/kirasok/alarmix/presentation/receiver/AlarmService.kt +++ b/app/src/main/java/io/github/kirasok/alarmix/presentation/receiver/AlarmService.kt @@ -53,7 +53,11 @@ class AlarmService : Service(), MediaPlayer.OnPreparedListener, MediaPlayer.OnEr onDestroy() } - AlarmAction.SNOOZE -> onDestroy() // TODO: implement snooze + AlarmAction.SNOOZE -> { + runBlocking { useCases.insertAlarm(alarm.copy(timestamp = alarm.timestamp.plusMinutes(5))) } + onDestroy() + } + null -> throw IllegalStateException("Alarm action can't be null") } }