For mozilla-mobile#26736 - fix username validation error state (#28017)

fork
Rahul Sainani 1 year ago committed by GitHub
parent 68bcf7e872
commit efdb1172ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -195,8 +195,10 @@ class AddLoginFragment : Fragment(R.layout.fragment_add_login), MenuProvider {
binding.usernameText.addTextChangedListener(
object : TextWatcher {
override fun afterTextChanged(u: Editable?) {
usernameChanged = true
override fun afterTextChanged(editable: Editable?) {
// update usernameChanged to true when the text is not empty,
// otherwise it is not changed, as this screen starts with an empty username.
usernameChanged = editable.toString().isNotEmpty()
updateUsernameField()
setSaveButtonState()
findDuplicate()

Loading…
Cancel
Save