Update identity auth type on changing provider

This commit is contained in:
M66B 2020-01-05 12:15:23 +01:00
parent c665dc2d05
commit 4708680e5d
1 changed files with 8 additions and 6 deletions

View File

@ -374,12 +374,14 @@ public class FragmentIdentity extends FragmentBase {
cbUseIp.setChecked(provider.useip);
EntityAccount account = (EntityAccount) spAccount.getSelectedItem();
etUser.setEnabled(auth == MailService.AUTH_TYPE_PASSWORD ||
account == null ||
provider.imap.host == null || !provider.imap.host.equals(account.host));
tilPassword.setEnabled(auth == MailService.AUTH_TYPE_PASSWORD ||
account == null ||
provider.imap.host == null || !provider.imap.host.equals(account.host));
if (account == null ||
provider.imap.host == null || !provider.imap.host.equals(account.host))
auth = MailService.AUTH_TYPE_PASSWORD;
else
auth = account.auth_type;
etUser.setEnabled(auth == MailService.AUTH_TYPE_PASSWORD);
tilPassword.setEnabled(auth == MailService.AUTH_TYPE_PASSWORD);
}
@Override