Fix a register issue

This commit is contained in:
Thomas 2020-10-15 19:02:12 +02:00
parent b79e17cb60
commit 785b4949e6
1 changed files with 5 additions and 3 deletions

View File

@ -145,10 +145,12 @@ public class PeertubeRegisterActivity extends AppCompatActivity {
return;
}
String[] emailArray = email.getText().toString().split("@");
if (!BuildConfig.full_instances) {
if (emailArray.length > 1 && !Arrays.asList(Helper.valideEmails).contains(emailArray[1])) {
Toasty.error(PeertubeRegisterActivity.this, getString(R.string.email_error_domain, emailArray[1])).show();
return;
}
}
if (password.getText().toString().trim().length() < 8) {
Toasty.error(PeertubeRegisterActivity.this, getString(R.string.password_too_short)).show();