Commit cdefc1d2 authored by Mygod's avatar Mygod

Fix IllegalArgumentException

parent 45b86476
......@@ -169,7 +169,7 @@ class CustomRulesFragment : ToolbarFragment(), Toolbar.OnMenuItemClickListener,
}
override fun ret(which: Int) = when (which) {
DialogInterface.BUTTON_POSITIVE, DialogInterface.BUTTON_NEUTRAL -> {
DialogInterface.BUTTON_POSITIVE -> {
AclEditResult(editText.text.toString().let { text ->
when (Template.values()[templateSelector.selectedItemPosition]) {
Template.Generic -> AclItem(text)
......@@ -179,6 +179,7 @@ class CustomRulesFragment : ToolbarFragment(), Toolbar.OnMenuItemClickListener,
}
}, arg)
}
DialogInterface.BUTTON_NEUTRAL -> AclEditResult(arg, arg)
else -> null
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment