handle null getNextAlarm()

This commit is contained in:
tibbi 2018-03-13 19:45:58 +01:00
parent 579a4057c6
commit c2cabfa84f

View file

@ -210,7 +210,7 @@ fun Context.formatTo12HourFormat(showSeconds: Boolean, hours: Int, minutes: Int,
return "${formatTime(showSeconds, false, newHours, minutes, seconds)} $appendable"
}
fun Context.getNextAlarm() = Settings.System.getString(contentResolver, Settings.System.NEXT_ALARM_FORMATTED)
fun Context.getNextAlarm() = Settings.System.getString(contentResolver, Settings.System.NEXT_ALARM_FORMATTED) ?: ""
fun Context.rescheduleEnabledAlarms() {
dbHelper.getEnabledAlarms().forEach {