Merge pull request #982 from deltachat/warn-outlook

add a warning when using outlook/hotmail addresses
This commit is contained in:
holger krekel
2019-06-27 14:27:10 +02:00
committed by GitHub
@@ -259,6 +259,9 @@ public class RegistrationActivity extends BaseActionBarActivity implements DcEve
} else if (isGmail(email)) {
showGmailNoOauth2Hint();
oauth2started.set(false);
} else if (isOutlook(email)) {
showOutlookHint();
oauth2started.set(false);
}
else {
oauth2started.set(false);
@@ -311,6 +314,30 @@ public class RegistrationActivity extends BaseActionBarActivity implements DcEve
}
}
private boolean isOutlook(String email) {
return email != null
&& (email.toLowerCase().contains("@outlook.") || email.toLowerCase().contains("@hotmail."));
}
private boolean outlookDialogShown;
private void showOutlookHint()
{
if(!outlookDialogShown) {
outlookDialogShown = true;
new AlertDialog.Builder(this)
.setMessage(
"Outlook- and Hotmail-e-mail-addresses "
+ "may currently not work as expected "
+ "as these servers may remove some important transport information."
+ "\n\n"
+ "Hopefully sooner or later there will be a fix; "
+ "for now, we suggest to use another e-mail-address "
+ "or try Delta Chat again when the issue is fixed.")
.setPositiveButton(R.string.ok, null)
.show();
}
}
private void verifyEmail(TextInputEditText view) {
String error = getString(R.string.login_error_mail);
String email = view.getText().toString();