1
0
Fork 0

FNX2-15653:Removes empty check

master
bawyap 2020-08-21 10:36:10 +05:30 committed by liuche
parent 8641fa39e0
commit 88a2273e4c
1 changed files with 2 additions and 6 deletions

View File

@ -57,13 +57,9 @@ class CreateShortcutFragment : DialogFragment() {
}
private fun updateAddButtonEnabledState() {
add_button.isEnabled = isTextValid()
add_button.alpha = if (isTextValid()) ENABLED_ALPHA else DISABLED_ALPHA
}
private fun isTextValid(): Boolean {
val text = shortcut_text.text
return text.isNotEmpty() && !text.isBlank()
add_button.isEnabled = text.isNotBlank()
add_button.alpha = if (text.isNotBlank()) ENABLED_ALPHA else DISABLED_ALPHA
}
companion object {