fix poll validation (#1459)
This commit is contained in:
parent
b703097d17
commit
44163d8720
2 changed files with 4 additions and 3 deletions
|
@ -48,8 +48,9 @@ fun showAddPollDialog(
|
|||
val adapter = AddPollOptionsAdapter(
|
||||
options = poll?.options?.toMutableList() ?: mutableListOf("", ""),
|
||||
maxOptionLength = maxOptionLength ?: DEFAULT_MAX_OPTION_LENGTH,
|
||||
onOptionRemoved = {
|
||||
onOptionRemoved = { valid ->
|
||||
view.addChoiceButton.isEnabled = true
|
||||
dialog.getButton(AlertDialog.BUTTON_POSITIVE).isEnabled = valid
|
||||
},
|
||||
onOptionChanged = { valid ->
|
||||
dialog.getButton(AlertDialog.BUTTON_POSITIVE).isEnabled = valid
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue