Skip to content

Commit

Permalink
Fix IllegalArgumentException
Browse files Browse the repository at this point in the history
  • Loading branch information
Mygod committed Aug 19, 2019
1 parent 45b8647 commit cdefc1d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -179,6 +179,7 @@ class CustomRulesFragment : ToolbarFragment(), Toolbar.OnMenuItemClickListener,
}
}, arg)
}
DialogInterface.BUTTON_NEUTRAL -> AclEditResult(arg, arg)
else -> null
}

Expand Down

0 comments on commit cdefc1d

Please sign in to comment.