minor code style formatting

This commit is contained in:
tibbi 2021-03-21 18:57:53 +01:00
parent 51b22197ca
commit bca4aa4704
2 changed files with 14 additions and 14 deletions

View File

@ -40,18 +40,18 @@ class EditEventTypeDialog(val activity: Activity, var eventType: EventType? = nu
}
AlertDialog.Builder(activity)
.setPositiveButton(R.string.ok, null)
.setNegativeButton(R.string.cancel, null)
.create().apply {
activity.setupDialogStuff(view, this, if (isNewEvent) R.string.add_new_type else R.string.edit_type) {
showKeyboard(view.type_title)
getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener {
ensureBackgroundThread {
eventTypeConfirmed(view.type_title.value, this)
}
.setPositiveButton(R.string.ok, null)
.setNegativeButton(R.string.cancel, null)
.create().apply {
activity.setupDialogStuff(view, this, if (isNewEvent) R.string.add_new_type else R.string.edit_type) {
showKeyboard(view.type_title)
getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener {
ensureBackgroundThread {
eventTypeConfirmed(view.type_title.value, this)
}
}
}
}
}
private fun setupColor(view: ImageView) {

View File

@ -35,13 +35,13 @@ class SelectEventTypeColorDialog(val activity: Activity, val eventType: EventTyp
wasInit = true
dialog = AlertDialog.Builder(activity)
.create().apply {
activity.setupDialogStuff(view, this)
.create().apply {
activity.setupDialogStuff(view, this)
if (colors.isEmpty()) {
showCustomColorPicker()
}
if (colors.isEmpty()) {
showCustomColorPicker()
}
}
}
private fun addRadioButton(colorKey: Int, color: Int) {