mirror of
https://github.com/moparisthebest/k-9
synced 2025-02-21 05:01:54 -05:00
Remove duplicated "make this account the default" option during setup
This commit is contained in:
parent
84ab290046
commit
4cc22f8208
@ -44,12 +44,6 @@
|
|||||||
android:id="@+id/account_display_count"
|
android:id="@+id/account_display_count"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="fill_parent" />
|
android:layout_width="fill_parent" />
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/account_default"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
|
||||||
android:text="@string/account_setup_options_default_label" />
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
android:id="@+id/account_notify"
|
android:id="@+id/account_notify"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -27,7 +27,6 @@ public class AccountSetupOptions extends K9Activity implements OnClickListener {
|
|||||||
|
|
||||||
private Spinner mDisplayCountView;
|
private Spinner mDisplayCountView;
|
||||||
|
|
||||||
private CheckBox mDefaultView;
|
|
||||||
|
|
||||||
private CheckBox mNotifyView;
|
private CheckBox mNotifyView;
|
||||||
private CheckBox mNotifySyncView;
|
private CheckBox mNotifySyncView;
|
||||||
@ -49,7 +48,6 @@ public class AccountSetupOptions extends K9Activity implements OnClickListener {
|
|||||||
|
|
||||||
mCheckFrequencyView = (Spinner)findViewById(R.id.account_check_frequency);
|
mCheckFrequencyView = (Spinner)findViewById(R.id.account_check_frequency);
|
||||||
mDisplayCountView = (Spinner)findViewById(R.id.account_display_count);
|
mDisplayCountView = (Spinner)findViewById(R.id.account_display_count);
|
||||||
mDefaultView = (CheckBox)findViewById(R.id.account_default);
|
|
||||||
mNotifyView = (CheckBox)findViewById(R.id.account_notify);
|
mNotifyView = (CheckBox)findViewById(R.id.account_notify);
|
||||||
mNotifySyncView = (CheckBox)findViewById(R.id.account_notify_sync);
|
mNotifySyncView = (CheckBox)findViewById(R.id.account_notify_sync);
|
||||||
mPushEnable = (CheckBox)findViewById(R.id.account_enable_push);
|
mPushEnable = (CheckBox)findViewById(R.id.account_enable_push);
|
||||||
@ -107,11 +105,7 @@ public class AccountSetupOptions extends K9Activity implements OnClickListener {
|
|||||||
mDisplayCountView.setAdapter(displayCountsAdapter);
|
mDisplayCountView.setAdapter(displayCountsAdapter);
|
||||||
|
|
||||||
mAccount = (Account)getIntent().getSerializableExtra(EXTRA_ACCOUNT);
|
mAccount = (Account)getIntent().getSerializableExtra(EXTRA_ACCOUNT);
|
||||||
boolean makeDefault = getIntent().getBooleanExtra(EXTRA_MAKE_DEFAULT, false);
|
|
||||||
|
|
||||||
if (mAccount.equals(Preferences.getPreferences(this).getDefaultAccount()) || makeDefault) {
|
|
||||||
mDefaultView.setChecked(true);
|
|
||||||
}
|
|
||||||
mNotifyView.setChecked(mAccount.isNotifyNewMail());
|
mNotifyView.setChecked(mAccount.isNotifyNewMail());
|
||||||
mNotifySyncView.setChecked(mAccount.isShowOngoing());
|
mNotifySyncView.setChecked(mAccount.isShowOngoing());
|
||||||
SpinnerOption.setSpinnerOptionValue(mCheckFrequencyView, mAccount
|
SpinnerOption.setSpinnerOptionValue(mCheckFrequencyView, mAccount
|
||||||
@ -157,7 +151,8 @@ public class AccountSetupOptions extends K9Activity implements OnClickListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
mAccount.save(Preferences.getPreferences(this));
|
mAccount.save(Preferences.getPreferences(this));
|
||||||
if (mDefaultView.isChecked()) {
|
if (mAccount.equals(Preferences.getPreferences(this).getDefaultAccount()) ||
|
||||||
|
getIntent().getBooleanExtra(EXTRA_MAKE_DEFAULT, false) ) {
|
||||||
Preferences.getPreferences(this).setDefaultAccount(mAccount);
|
Preferences.getPreferences(this).setDefaultAccount(mAccount);
|
||||||
}
|
}
|
||||||
Email.setServicesEnabled(this);
|
Email.setServicesEnabled(this);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user