allows username when logging in
This commit is contained in:
parent
aaa8281da8
commit
13baaccd81
|
@ -119,6 +119,7 @@ public class LoginActivity extends AppCompatActivity {
|
|||
|
||||
connectionButton = findViewById(R.id.login_button);
|
||||
|
||||
if (!BuildConfig.full_instances) {
|
||||
login_uid.setOnFocusChangeListener((v, hasFocus) -> {
|
||||
if (!hasFocus) {
|
||||
if (android.util.Patterns.EMAIL_ADDRESS.matcher(login_uid.getText().toString().trim()).matches()) {
|
||||
|
@ -129,11 +130,12 @@ public class LoginActivity extends AppCompatActivity {
|
|||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
connectionButton.setOnClickListener(v -> {
|
||||
|
||||
if (!android.util.Patterns.EMAIL_ADDRESS.matcher(login_uid.getText().toString().trim()).matches()) {
|
||||
if (login_uid.getText().toString().contains("@") && !android.util.Patterns.EMAIL_ADDRESS.matcher(login_uid.getText().toString().trim()).matches()) {
|
||||
Toasty.error(LoginActivity.this, getString(R.string.email_error)).show();
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue