if a CalDAV calendar doesnt provide any colors, show the custom color picker

This commit is contained in:
tibbi 2018-10-24 20:51:51 +02:00
parent 6001d8422a
commit 4caacb8173
1 changed files with 5 additions and 1 deletions

View File

@ -36,6 +36,10 @@ class SelectEventTypeColorDialog(val activity: Activity, val eventType: EventTyp
dialog = AlertDialog.Builder(activity)
.create().apply {
activity.setupDialogStuff(view, this)
if (colors.isEmpty()) {
showCustomColorPicker()
}
}
}
@ -66,8 +70,8 @@ class SelectEventTypeColorDialog(val activity: Activity, val eventType: EventTyp
ColorPickerDialog(activity, activity.config.primaryColor) { wasPositivePressed, color ->
if (wasPositivePressed) {
callback(color)
dialog?.dismiss()
}
dialog?.dismiss()
}
}
}