diff --git a/app/core/src/main/java/com/fsck/k9/AccountPreferenceSerializer.kt b/app/core/src/main/java/com/fsck/k9/AccountPreferenceSerializer.kt index 52c2dbde64c..e1ed554f8d3 100644 --- a/app/core/src/main/java/com/fsck/k9/AccountPreferenceSerializer.kt +++ b/app/core/src/main/java/com/fsck/k9/AccountPreferenceSerializer.kt @@ -124,7 +124,10 @@ class AccountPreferenceSerializer( maxPushFolders = storage.getInt("$accountUuid.maxPushFolders", 10) isSubscribedFoldersOnly = storage.getBoolean("$accountUuid.subscribedFoldersOnly", false) maximumPolledMessageAge = storage.getInt("$accountUuid.maximumPolledMessageAge", -1) - maximumAutoDownloadMessageSize = storage.getInt("$accountUuid.maximumAutoDownloadMessageSize", 32768) + maximumAutoDownloadMessageSize = storage.getInt( + "$accountUuid.maximumAutoDownloadMessageSize", + DEFAULT_MAXIMUM_AUTO_DOWNLOAD_MESSAGE_SIZE, + ) messageFormat = getEnumStringPref(storage, "$accountUuid.messageFormat", DEFAULT_MESSAGE_FORMAT) val messageFormatAuto = storage.getBoolean("$accountUuid.messageFormatAuto", DEFAULT_MESSAGE_FORMAT_AUTO) if (messageFormatAuto && messageFormat == MessageFormat.TEXT) { @@ -597,7 +600,7 @@ class AccountPreferenceSerializer( maxPushFolders = 10 isSubscribedFoldersOnly = false maximumPolledMessageAge = -1 - maximumAutoDownloadMessageSize = 32768 + maximumAutoDownloadMessageSize = DEFAULT_MAXIMUM_AUTO_DOWNLOAD_MESSAGE_SIZE messageFormat = DEFAULT_MESSAGE_FORMAT isMessageFormatAuto = DEFAULT_MESSAGE_FORMAT_AUTO isMessageReadReceipt = DEFAULT_MESSAGE_READ_RECEIPT @@ -672,5 +675,6 @@ class AccountPreferenceSerializer( const val DEFAULT_STRIP_SIGNATURE = true const val DEFAULT_REMOTE_SEARCH_NUM_RESULTS = 25 const val DEFAULT_RINGTONE_URI = "content://settings/system/notification_sound" + const val DEFAULT_MAXIMUM_AUTO_DOWNLOAD_MESSAGE_SIZE = 131072 } } diff --git a/app/core/src/main/java/com/fsck/k9/preferences/AccountSettingsDescriptions.java b/app/core/src/main/java/com/fsck/k9/preferences/AccountSettingsDescriptions.java index 99e38066c34..8a846329a2e 100644 --- a/app/core/src/main/java/com/fsck/k9/preferences/AccountSettingsDescriptions.java +++ b/app/core/src/main/java/com/fsck/k9/preferences/AccountSettingsDescriptions.java @@ -135,7 +135,8 @@ public class AccountSettingsDescriptions { new V(1, new IntegerRangeSetting(0, 100, 10)) )); s.put("maximumAutoDownloadMessageSize", Settings.versions( - new V(1, new IntegerResourceSetting(32768, R.array.autodownload_message_size_values)) + new V(1, new IntegerResourceSetting(32768, R.array.autodownload_message_size_values)), + new V(93, new IntegerResourceSetting(131072, R.array.autodownload_message_size_values)) )); s.put("maximumPolledMessageAge", Settings.versions( new V(1, new IntegerResourceSetting(-1, R.array.message_age_values)) diff --git a/app/core/src/main/java/com/fsck/k9/preferences/Settings.java b/app/core/src/main/java/com/fsck/k9/preferences/Settings.java index 2c4bc77cb50..cde3eb6482a 100644 --- a/app/core/src/main/java/com/fsck/k9/preferences/Settings.java +++ b/app/core/src/main/java/com/fsck/k9/preferences/Settings.java @@ -36,7 +36,7 @@ public class Settings { * * @see SettingsExporter */ - public static final int VERSION = 92; + public static final int VERSION = 93; static Map validate(int version, Map> settings, Map importedSettings, boolean useDefaultValues) {