mirror of
https://github.com/moparisthebest/k-9
synced 2025-01-12 06:08:25 -05:00
Remove the "make this the default account" checkbox from the account setup flow.
If you're adding a new account, it's less likely to be your default than your first was. No reason for this in initial flow
This commit is contained in:
parent
bb90f6d4ba
commit
83c5783442
@ -35,13 +35,6 @@
|
|||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:nextFocusDown="@+id/next"
|
android:nextFocusDown="@+id/next"
|
||||||
/>
|
/>
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/account_default"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:text="@string/account_setup_basics_default_label"
|
|
||||||
android:visibility="gone"
|
|
||||||
/>
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="0dip"
|
android:layout_height="0dip"
|
||||||
|
@ -26,8 +26,7 @@ import java.net.URISyntaxException;
|
|||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prompts the user for the email address and password. Also prompts for
|
* Prompts the user for the email address and password.
|
||||||
* "Use this account as default" if this is the 2nd+ account being set up.
|
|
||||||
* Attempts to lookup default settings for the domain the user specified. If the
|
* Attempts to lookup default settings for the domain the user specified. If the
|
||||||
* domain is known the settings are handed off to the AccountSetupCheckSettings
|
* domain is known the settings are handed off to the AccountSetupCheckSettings
|
||||||
* activity. If no settings are found the settings are handed off to the
|
* activity. If no settings are found the settings are handed off to the
|
||||||
@ -43,7 +42,6 @@ public class AccountSetupBasics extends K9Activity
|
|||||||
private Preferences mPrefs;
|
private Preferences mPrefs;
|
||||||
private EditText mEmailView;
|
private EditText mEmailView;
|
||||||
private EditText mPasswordView;
|
private EditText mPasswordView;
|
||||||
private CheckBox mDefaultView;
|
|
||||||
private Button mNextButton;
|
private Button mNextButton;
|
||||||
private Button mManualSetupButton;
|
private Button mManualSetupButton;
|
||||||
private Account mAccount;
|
private Account mAccount;
|
||||||
@ -63,7 +61,6 @@ public class AccountSetupBasics extends K9Activity
|
|||||||
mPrefs = Preferences.getPreferences(this);
|
mPrefs = Preferences.getPreferences(this);
|
||||||
mEmailView = (EditText)findViewById(R.id.account_email);
|
mEmailView = (EditText)findViewById(R.id.account_email);
|
||||||
mPasswordView = (EditText)findViewById(R.id.account_password);
|
mPasswordView = (EditText)findViewById(R.id.account_password);
|
||||||
mDefaultView = (CheckBox)findViewById(R.id.account_default);
|
|
||||||
mNextButton = (Button)findViewById(R.id.next);
|
mNextButton = (Button)findViewById(R.id.next);
|
||||||
mManualSetupButton = (Button)findViewById(R.id.manual_setup);
|
mManualSetupButton = (Button)findViewById(R.id.manual_setup);
|
||||||
|
|
||||||
@ -73,10 +70,6 @@ public class AccountSetupBasics extends K9Activity
|
|||||||
mEmailView.addTextChangedListener(this);
|
mEmailView.addTextChangedListener(this);
|
||||||
mPasswordView.addTextChangedListener(this);
|
mPasswordView.addTextChangedListener(this);
|
||||||
|
|
||||||
if (mPrefs.getAccounts().length > 0) {
|
|
||||||
mDefaultView.setVisibility(View.VISIBLE);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (savedInstanceState != null && savedInstanceState.containsKey(EXTRA_ACCOUNT)) {
|
if (savedInstanceState != null && savedInstanceState.containsKey(EXTRA_ACCOUNT)) {
|
||||||
String accountUuid = savedInstanceState.getString(EXTRA_ACCOUNT);
|
String accountUuid = savedInstanceState.getString(EXTRA_ACCOUNT);
|
||||||
mAccount = Preferences.getPreferences(this).getAccount(accountUuid);
|
mAccount = Preferences.getPreferences(this).getAccount(accountUuid);
|
||||||
@ -276,9 +269,6 @@ public class AccountSetupBasics extends K9Activity
|
|||||||
if (resultCode == RESULT_OK) {
|
if (resultCode == RESULT_OK) {
|
||||||
mAccount.setDescription(mAccount.getEmail());
|
mAccount.setDescription(mAccount.getEmail());
|
||||||
mAccount.save(Preferences.getPreferences(this));
|
mAccount.save(Preferences.getPreferences(this));
|
||||||
if (mDefaultView.isChecked()) {
|
|
||||||
Preferences.getPreferences(this).setDefaultAccount(mAccount);
|
|
||||||
}
|
|
||||||
K9.setServicesEnabled(this);
|
K9.setServicesEnabled(this);
|
||||||
AccountSetupNames.actionSetNames(this, mAccount);
|
AccountSetupNames.actionSetNames(this, mAccount);
|
||||||
finish();
|
finish();
|
||||||
@ -323,7 +313,8 @@ public class AccountSetupBasics extends K9Activity
|
|||||||
mAccount.setSpamFolderName(getString(R.string.special_mailbox_name_spam));
|
mAccount.setSpamFolderName(getString(R.string.special_mailbox_name_spam));
|
||||||
}
|
}
|
||||||
|
|
||||||
AccountSetupAccountType.actionSelectAccountType(this, mAccount, mDefaultView.isChecked());
|
AccountSetupAccountType.actionSelectAccountType(this, mAccount, false);
|
||||||
|
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user