fix some crashes at setting reminder to empty value

This commit is contained in:
tibbi 2016-11-30 21:43:02 +01:00
parent da2ea22017
commit 36486710a5
2 changed files with 2 additions and 2 deletions

View File

@ -270,7 +270,7 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener {
2 -> DAY_MINS 2 -> DAY_MINS
else -> 1 else -> 1
} }
Integer.valueOf(value) * multiplier Integer.valueOf(if (value.isEmpty()) "0" else value) * multiplier
} }
} }
} }

View File

@ -101,7 +101,7 @@ class SettingsActivity : SimpleActivity() {
else -> 1 else -> 1
} }
mConfig.defaultReminderMinutes = Integer.valueOf(value) * multiplier mConfig.defaultReminderMinutes = Integer.valueOf(if (value.isEmpty()) "0" else value) * multiplier
mConfig.defaultReminderType = REMINDER_CUSTOM mConfig.defaultReminderType = REMINDER_CUSTOM
toast(R.string.reminder_saved) toast(R.string.reminder_saved)
hideKeyboard() hideKeyboard()