Fix hide manager dialog

This commit is contained in:
topjohnwu 2020-08-23 04:24:06 -07:00
parent 59106e4f52
commit 354440ee8a

View File

@ -78,19 +78,19 @@ object Hide : BaseSettingsItem.Input() {
override val title = R.string.settings_hide_manager_title.asTransitive() override val title = R.string.settings_hide_manager_title.asTransitive()
override val description = R.string.settings_hide_manager_summary.asTransitive() override val description = R.string.settings_hide_manager_summary.asTransitive()
override var value = "Manager" override var value = ""
set(value) = setV(value, field, { field = it }) set(value) = setV(value, field, { field = it })
override val inputResult override val inputResult
get() = if (isError) null else result get() = if (isError) null else result
@get:Bindable @get:Bindable
var result = value var result = "Manager"
set(value) = set(value, field, { field = it }, BR.result, BR.error) set(value) = set(value, field, { field = it }, BR.result, BR.error)
@get:Bindable @get:Bindable
val isError val isError
get() = value.length > 14 || value.isBlank() get() = result.length > 14 || result.isBlank()
override fun getView(context: Context) = DialogSettingsAppNameBinding override fun getView(context: Context) = DialogSettingsAppNameBinding
.inflate(LayoutInflater.from(context)).also { it.data = this }.root .inflate(LayoutInflater.from(context)).also { it.data = this }.root