update timer and alarm sounds if the current selection has been deleted

This commit is contained in:
tibbi
2018-03-29 23:43:31 +02:00
parent b9adb1306b
commit 3cf6ef12bf
3 changed files with 24 additions and 3 deletions

View File

@ -90,6 +90,8 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont
fun getAlarmWithId(id: Int) = getAlarms().firstOrNull { it.id == id }
fun getAlarmsWithUri(uri: String) = getAlarms().filter { it.soundUri == uri }
private fun fillAlarmContentValues(alarm: Alarm): ContentValues {
return ContentValues().apply {
put(COL_TIME_IN_MINUTES, alarm.timeInMinutes)