|
@ -750,15 +750,21 @@ public class FragmentAccount extends FragmentEx { |
|
|
|
|
|
|
|
|
if (savedInstanceState == null) { |
|
|
if (savedInstanceState == null) { |
|
|
if (account != null) { |
|
|
if (account != null) { |
|
|
|
|
|
boolean found = false; |
|
|
for (int pos = 2; pos < providers.size(); pos++) { |
|
|
for (int pos = 2; pos < providers.size(); pos++) { |
|
|
Provider provider = providers.get(pos); |
|
|
Provider provider = providers.get(pos); |
|
|
if (provider.imap_host.equals(account.host) && |
|
|
if (provider.imap_host.equals(account.host) && |
|
|
provider.imap_port == account.port) { |
|
|
provider.imap_port == account.port) { |
|
|
|
|
|
found = true; |
|
|
spProvider.setTag(pos); |
|
|
spProvider.setTag(pos); |
|
|
spProvider.setSelection(pos); |
|
|
spProvider.setSelection(pos); |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
if (!found) { |
|
|
|
|
|
spProvider.setTag(1); |
|
|
|
|
|
spProvider.setSelection(1); |
|
|
|
|
|
} |
|
|
etHost.setText(account.host); |
|
|
etHost.setText(account.host); |
|
|
etPort.setText(Long.toString(account.port)); |
|
|
etPort.setText(Long.toString(account.port)); |
|
|
} |
|
|
} |
|
|