mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-01 01:06:11 +00:00
Improved error dialog
This commit is contained in:
parent
458997e4fa
commit
2194d946e7
1 changed files with 8 additions and 3 deletions
|
@ -109,8 +109,12 @@ public class ActivityError extends ActivityBase {
|
|||
? View.VISIBLE : View.GONE);
|
||||
|
||||
boolean password = (auth_type == ServiceAuthenticator.AUTH_TYPE_PASSWORD);
|
||||
boolean outlook = ("outlook.office365.com".equalsIgnoreCase(host) ||
|
||||
"smtp.office365.com".equalsIgnoreCase(host) ||
|
||||
"imap-mail.outlook.com".equalsIgnoreCase(host) ||
|
||||
"smtp-mail.outlook.com".equalsIgnoreCase(host));
|
||||
|
||||
btnPassword.setText(password ? R.string.title_password : R.string.title_setup_oauth_authorize);
|
||||
btnPassword.setText(password && !outlook ? R.string.title_password : R.string.title_setup_oauth_authorize);
|
||||
btnPassword.setCompoundDrawablesRelativeWithIntrinsicBounds(
|
||||
0, 0,
|
||||
password ? R.drawable.twotone_edit_24 : R.drawable.twotone_check_24, 0);
|
||||
|
@ -143,11 +147,12 @@ public class ActivityError extends ActivityBase {
|
|||
startActivity(new Intent(ActivityError.this, ActivitySetup.class)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK));
|
||||
}
|
||||
} else if (auth_type == ServiceAuthenticator.AUTH_TYPE_GRAPH)
|
||||
} else if (auth_type == ServiceAuthenticator.AUTH_TYPE_GRAPH ||
|
||||
(auth_type == ServiceAuthenticator.AUTH_TYPE_PASSWORD && outlook))
|
||||
startActivity(new Intent(ActivityError.this, ActivitySetup.class)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK)
|
||||
.putExtra("target", "oauth")
|
||||
.putExtra("id", provider)
|
||||
.putExtra("id", "outlookgraph")
|
||||
.putExtra("name", "Outlook")
|
||||
.putExtra("askAccount", true)
|
||||
.putExtra("askTenant", true)
|
||||
|
|
Loading…
Reference in a new issue