Closes #251.
This commit is contained in:
parent
17251e576b
commit
92c335b4e1
@ -163,7 +163,7 @@ class LoginActivity : AppCompatActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
if (isWithLogin || isWithHTTPLogin) {
|
||||
if (isWithLogin) {
|
||||
if (TextUtils.isEmpty(password)) {
|
||||
passwordView.error = getString(R.string.error_invalid_password)
|
||||
focusView = passwordView
|
||||
@ -177,6 +177,20 @@ class LoginActivity : AppCompatActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
if (isWithHTTPLogin) {
|
||||
if (TextUtils.isEmpty(httpPassword)) {
|
||||
httpPasswordView.error = getString(R.string.error_invalid_password)
|
||||
focusView = httpPasswordView
|
||||
cancel = true
|
||||
}
|
||||
|
||||
if (TextUtils.isEmpty(httpLogin)) {
|
||||
httpLoginView.error = getString(R.string.error_field_required)
|
||||
focusView = httpLoginView
|
||||
cancel = true
|
||||
}
|
||||
}
|
||||
|
||||
if (cancel) {
|
||||
focusView?.requestFocus()
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user