diff --git a/app/src/main/java/apps/amine/bou/readerforselfoss/LoginActivity.kt b/app/src/main/java/apps/amine/bou/readerforselfoss/LoginActivity.kt index 0410307..42cb991 100644 --- a/app/src/main/java/apps/amine/bou/readerforselfoss/LoginActivity.kt +++ b/app/src/main/java/apps/amine/bou/readerforselfoss/LoginActivity.kt @@ -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 {