mirror of
https://github.com/moparisthebest/k-9
synced 2025-01-11 13:49:15 -05:00
move "saveAllHeaders" to the account preferences screen.
This commit is contained in:
parent
f6378b3df4
commit
28388b235e
@ -245,17 +245,6 @@
|
||||
android:contentDescription="@string/account_setup_incoming_compression_label"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:text="@string/account_setup_incoming_save_all_headers_title"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorPrimary" />
|
||||
<CheckBox
|
||||
android:id="@+id/save_all_headers"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:text="@string/account_setup_incoming_save_all_headers_label" />
|
||||
<LinearLayout
|
||||
android:id="@+id/push_poll_on_connect_section"
|
||||
android:layout_width="fill_parent"
|
||||
|
@ -391,8 +391,8 @@ Welcome to K-9 Mail setup. K-9 is an open source mail client for Android origin
|
||||
<string name="account_setup_incoming_wifi_label">Wi-Fi</string>
|
||||
<string name="account_setup_incoming_other_label">Other</string>
|
||||
|
||||
<string name="account_setup_incoming_save_all_headers_title">Downloading of mail headers</string>
|
||||
<string name="account_setup_incoming_save_all_headers_label">Save all headers locally</string>
|
||||
<string name="account_setup_incoming_save_all_headers_title">Download headers</string>
|
||||
<string name="account_setup_incoming_save_all_headers_label">Save all message headers locally</string>
|
||||
|
||||
<string name="account_setup_expunge_policy_label">Expunge deleted messages</string>
|
||||
<string name="account_setup_expunge_policy_immediately">Immediately</string>
|
||||
|
@ -83,10 +83,6 @@
|
||||
</PreferenceScreen>
|
||||
|
||||
<PreferenceScreen android:title="@string/account_settings_sync" android:key="incoming">
|
||||
<PreferenceScreen
|
||||
android:key="incoming"
|
||||
android:title="@string/account_settings_incoming_label"
|
||||
android:summary="@string/account_settings_incoming_summary" />
|
||||
|
||||
|
||||
<ListPreference
|
||||
@ -150,16 +146,19 @@
|
||||
android:entries="@array/account_setup_expunge_policy_entries"
|
||||
android:entryValues="@array/account_setup_expunge_policy_values"
|
||||
android:dialogTitle="@string/account_setup_expunge_policy_label" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:title="@string/account_setup_incoming_save_all_headers_title"
|
||||
android:key="account_save_all_headers"
|
||||
android:summary="@string/account_setup_incoming_save_all_headers_label" />
|
||||
<PreferenceScreen
|
||||
android:key="incoming"
|
||||
android:title="@string/account_settings_incoming_label"
|
||||
android:summary="@string/account_settings_incoming_summary" />
|
||||
</PreferenceScreen>
|
||||
|
||||
|
||||
<PreferenceScreen android:title="@string/account_settings_composition" android:key="composing">
|
||||
|
||||
<PreferenceScreen
|
||||
android:key="outgoing"
|
||||
android:title="@string/account_settings_outgoing_label"
|
||||
android:summary="@string/account_settings_outgoing_summary" />
|
||||
<PreferenceScreen
|
||||
android:key="composition"
|
||||
android:summary="@string/account_settings_composition_summary"
|
||||
@ -183,6 +182,10 @@
|
||||
android:title="@string/account_settings_quote_prefix_label"
|
||||
android:summary=""
|
||||
android:dialogTitle="@string/account_settings_quote_prefix_label" />
|
||||
<PreferenceScreen
|
||||
android:key="outgoing"
|
||||
android:title="@string/account_settings_outgoing_label"
|
||||
android:summary="@string/account_settings_outgoing_summary" />
|
||||
|
||||
</PreferenceScreen>
|
||||
<PreferenceScreen android:title="@string/account_settings_folders" android:key="folders">
|
||||
|
@ -151,7 +151,7 @@ public class Account implements BaseAccount
|
||||
mLocalStoreUri = "local://localhost/" + context.getDatabasePath(mUuid + ".db");
|
||||
mAutomaticCheckIntervalMinutes = -1;
|
||||
mIdleRefreshMinutes = 24;
|
||||
mSaveAllHeaders = false;
|
||||
mSaveAllHeaders = true;
|
||||
mPushPollOnConnect = true;
|
||||
mDisplayCount = K9.DEFAULT_VISIBLE_LIMIT;
|
||||
mAccountNumber = -1;
|
||||
@ -226,7 +226,7 @@ public class Account implements BaseAccount
|
||||
mIdleRefreshMinutes = prefs.getInt(mUuid
|
||||
+ ".idleRefreshMinutes", 24);
|
||||
mSaveAllHeaders = prefs.getBoolean(mUuid
|
||||
+ ".saveAllHeaders", false);
|
||||
+ ".saveAllHeaders", true);
|
||||
mPushPollOnConnect = prefs.getBoolean(mUuid
|
||||
+ ".pushPollOnConnect", true);
|
||||
mDisplayCount = prefs.getInt(mUuid + ".displayCount", K9.DEFAULT_VISIBLE_LIMIT);
|
||||
@ -1290,7 +1290,7 @@ public class Account implements BaseAccount
|
||||
mPushPollOnConnect = pushPollOnConnect;
|
||||
}
|
||||
|
||||
public synchronized boolean isSaveAllHeaders()
|
||||
public synchronized boolean saveAllHeaders()
|
||||
{
|
||||
return mSaveAllHeaders;
|
||||
}
|
||||
|
@ -71,6 +71,7 @@ public class AccountSettings extends K9PreferenceActivity
|
||||
private static final String PREFERENCE_NOTIFICATION_OPENS_UNREAD = "notification_opens_unread";
|
||||
private static final String PREFERENCE_MESSAGE_AGE = "account_message_age";
|
||||
private static final String PREFERENCE_MESSAGE_SIZE = "account_autodownload_size";
|
||||
private static final String PREFERENCE_SAVE_ALL_HEADERS = "account_save_all_headers";
|
||||
private static final String PREFERENCE_QUOTE_PREFIX = "account_quote_prefix";
|
||||
private static final String PREFERENCE_REPLY_AFTER_QUOTE = "reply_after_quote";
|
||||
private static final String PREFERENCE_SYNC_REMOTE_DELETIONS = "account_sync_remote_deletetions";
|
||||
@ -112,6 +113,7 @@ public class AccountSettings extends K9PreferenceActivity
|
||||
private EditTextPreference mAccountQuotePrefix;
|
||||
private CheckBoxPreference mReplyAfterQuote;
|
||||
private CheckBoxPreference mSyncRemoteDeletions;
|
||||
private CheckBoxPreference mSaveAllHeaders;
|
||||
private ListPreference mCryptoApp;
|
||||
private CheckBoxPreference mCryptoAutoSignature;
|
||||
|
||||
@ -291,6 +293,12 @@ public class AccountSettings extends K9PreferenceActivity
|
||||
mSyncRemoteDeletions = (CheckBoxPreference) findPreference(PREFERENCE_SYNC_REMOTE_DELETIONS);
|
||||
mSyncRemoteDeletions.setChecked(mAccount.syncRemoteDeletions());
|
||||
|
||||
|
||||
mSaveAllHeaders = (CheckBoxPreference) findPreference(PREFERENCE_SAVE_ALL_HEADERS);
|
||||
mSaveAllHeaders.setChecked(mAccount.saveAllHeaders());
|
||||
|
||||
|
||||
|
||||
mSearchableFolders = (ListPreference) findPreference(PREFERENCE_SEARCHABLE_FOLDERS);
|
||||
mSearchableFolders.setValue(mAccount.getSearchableFolders().name());
|
||||
mSearchableFolders.setSummary(mSearchableFolders.getEntry());
|
||||
@ -630,6 +638,7 @@ public class AccountSettings extends K9PreferenceActivity
|
||||
mAccount.setDeletePolicy(Integer.parseInt(mDeletePolicy.getValue()));
|
||||
mAccount.setExpungePolicy(mExpungePolicy.getValue());
|
||||
mAccount.setSyncRemoteDeletions(mSyncRemoteDeletions.isChecked());
|
||||
mAccount.setSaveAllHeaders(mSaveAllHeaders.isChecked());
|
||||
mAccount.setSearchableFolders(Account.Searchable.valueOf(mSearchableFolders.getValue()));
|
||||
mAccount.setQuotePrefix(mAccountQuotePrefix.getText());
|
||||
mAccount.setReplyAfterQuote(mReplyAfterQuote.isChecked());
|
||||
|
@ -88,7 +88,6 @@ public class AccountSetupIncoming extends K9Activity implements OnClickListener
|
||||
private CheckBox compressionMobile;
|
||||
private CheckBox compressionWifi;
|
||||
private CheckBox compressionOther;
|
||||
private CheckBox saveAllHeaders;
|
||||
private CheckBox pushPollOnConnect;
|
||||
private Spinner idleRefreshPeriod;
|
||||
private Spinner folderPushLimit;
|
||||
@ -137,7 +136,6 @@ public class AccountSetupIncoming extends K9Activity implements OnClickListener
|
||||
compressionMobile = (CheckBox)findViewById(R.id.compression_mobile);
|
||||
compressionWifi = (CheckBox)findViewById(R.id.compression_wifi);
|
||||
compressionOther = (CheckBox)findViewById(R.id.compression_other);
|
||||
saveAllHeaders = (CheckBox)findViewById(R.id.save_all_headers);
|
||||
pushPollOnConnect = (CheckBox)findViewById(R.id.push_poll_on_connect);
|
||||
|
||||
subscribedFoldersOnly = (CheckBox)findViewById(R.id.subscribed_folders_only);
|
||||
@ -423,7 +421,6 @@ public class AccountSetupIncoming extends K9Activity implements OnClickListener
|
||||
updatePortFromSecurityType();
|
||||
}
|
||||
|
||||
saveAllHeaders.setChecked(mAccount.isSaveAllHeaders());
|
||||
pushPollOnConnect.setChecked(mAccount.isPushPollOnConnect());
|
||||
subscribedFoldersOnly.setChecked(mAccount.subscribedFoldersOnly());
|
||||
SpinnerHelper.initSpinner(this, idleRefreshPeriod, R.array.idle_refresh_period_entries,
|
||||
@ -588,7 +585,6 @@ public class AccountSetupIncoming extends K9Activity implements OnClickListener
|
||||
mAccount.setCompression(Account.TYPE_MOBILE, compressionMobile.isChecked());
|
||||
mAccount.setCompression(Account.TYPE_WIFI, compressionWifi.isChecked());
|
||||
mAccount.setCompression(Account.TYPE_OTHER, compressionOther.isChecked());
|
||||
mAccount.setSaveAllHeaders(saveAllHeaders.isChecked());
|
||||
mAccount.setPushPollOnConnect(pushPollOnConnect.isChecked());
|
||||
mAccount.setSubscribedFoldersOnly(subscribedFoldersOnly.isChecked());
|
||||
String idleRefreshPeriodValue = SpinnerHelper.getSpinnerValue(idleRefreshPeriod);
|
||||
|
@ -1962,7 +1962,7 @@ public class LocalStore extends Store implements Serializable
|
||||
*/
|
||||
private void saveHeaders(long id, MimeMessage message) throws MessagingException
|
||||
{
|
||||
boolean saveAllHeaders = mAccount.isSaveAllHeaders();
|
||||
boolean saveAllHeaders = mAccount.saveAllHeaders();
|
||||
boolean gotAdditionalHeaders = false;
|
||||
|
||||
deleteHeaders(id);
|
||||
|
Loading…
Reference in New Issue
Block a user