1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-30 13:12:25 -05:00

Fix outgoing server settings display

Add test for username == "".

Without it, the mRequireLoginView remains checked, and the empty username
and password boxes are not hidden.

The problem occurs if importing an SMTP server that has an
authenticationType, but no username or password (i.e., no authentication
required).

That's the way settings were exported in 4.904 and before.
This commit is contained in:
Joe Steele 2014-07-15 10:57:57 -04:00
parent 373c7569ed
commit c861b27df8

View File

@ -149,7 +149,7 @@ public class AccountSetupOutgoing extends K9Activity implements OnClickListener,
mCurrentSecurityTypeViewPosition = settings.connectionSecurity.ordinal(); mCurrentSecurityTypeViewPosition = settings.connectionSecurity.ordinal();
mSecurityTypeView.setSelection(mCurrentSecurityTypeViewPosition, false); mSecurityTypeView.setSelection(mCurrentSecurityTypeViewPosition, false);
if (settings.username != null) { if (settings.username != null && !settings.username.isEmpty()) {
mUsernameView.setText(settings.username); mUsernameView.setText(settings.username);
mRequireLoginView.setChecked(true); mRequireLoginView.setChecked(true);
mRequireLoginSettingsView.setVisibility(View.VISIBLE); mRequireLoginSettingsView.setVisibility(View.VISIBLE);