1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-01 12:44:42 +00:00

Exclude Live and Hotmail accounts for Outlook check

This commit is contained in:
M66B 2022-05-12 08:07:15 +02:00
parent 93c3169f5a
commit 4a51f866e6
2 changed files with 10 additions and 1 deletions

View file

@ -4858,11 +4858,15 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
int passwd = 0;
if (accounts != null)
for (EntityAccount account : accounts)
if (account.isOutlook())
if (account.isOutlook()) {
String user = (account.user == null ? "" : account.user.toLowerCase(Locale.ROOT));
if (user.contains("@hotmail") || user.contains("@live"))
continue;
if (account.auth_type == ServiceAuthenticator.AUTH_TYPE_OAUTH)
oauth++;
else if (account.auth_type == ServiceAuthenticator.AUTH_TYPE_PASSWORD)
passwd++;
}
if (oauth + passwd == 0) {
prefs.edit().putBoolean("outlook_checked", true).apply();

View file

@ -1613,6 +1613,11 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
editor.remove(key);
}
if (BuildConfig.DEBUG) {
editor.remove("gmail_checked");
editor.remove("outlook_checked");
}
editor.apply();
ToastEx.makeText(context, R.string.title_setup_done, Toast.LENGTH_LONG).show();