show the alarm reliability warning at saving the first event too

This commit is contained in:
tibbi 2021-05-01 22:10:36 +02:00
parent 01cdcb412b
commit 12efdc90c7
1 changed files with 11 additions and 0 deletions

View File

@ -994,7 +994,18 @@ class EventActivity : SimpleActivity() {
private fun saveCurrentEvent() {
ensureBackgroundThread {
trySaveEvent()
}
}
private fun trySaveEvent() {
if (config.wasAlarmWarningShown || (mReminder1Minutes == REMINDER_OFF && mReminder2Minutes == REMINDER_OFF && mReminder3Minutes == REMINDER_OFF)) {
saveEvent()
} else {
ConfirmationDialog(this, messageId = R.string.reminder_warning, positive = R.string.ok, negative = 0) {
config.wasAlarmWarningShown = true
saveEvent()
}
}
}