Skip to content

Commit

Permalink
feat(ui): implement snooze
Browse files Browse the repository at this point in the history
  • Loading branch information
kirasok committed Apr 3, 2024
1 parent 91e72c8 commit 9247995
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}
Expand Down

0 comments on commit 9247995

Please sign in to comment.