We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 985e156 commit 400d805Copy full SHA for 400d805
vector/src/main/java/im/vector/app/core/extensions/TextInputLayout.kt
@@ -44,10 +44,9 @@ fun TextInputLayout.content() = editText().text.toString()
44
fun TextInputLayout.hasContent() = !editText().text.isNullOrEmpty()
45
46
fun TextInputLayout.clearErrorOnChange(lifecycleOwner: LifecycleOwner) {
47
- editText()
48
- .textChanges()
49
- .onEach { error = null }
50
- .launchIn(lifecycleOwner.lifecycleScope)
+ onTextChange(lifecycleOwner) {
+ error = null
+ }
51
}
52
53
fun TextInputLayout.onTextChange(lifecycleOwner: LifecycleOwner, action: (CharSequence) -> Unit) {
0 commit comments