Skip to content

Commit

Permalink
Change default value for "Fetch messages up to" to 128KiB
Browse files Browse the repository at this point in the history
  • Loading branch information
cketti committed Jun 20, 2024
1 parent a1e5ae8 commit 2d44be5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class Settings {
*
* @see SettingsExporter
*/
public static final int VERSION = 92;
public static final int VERSION = 93;

static Map<String, Object> validate(int version, Map<String, TreeMap<Integer, SettingsDescription>> settings,
Map<String, String> importedSettings, boolean useDefaultValues) {
Expand Down

0 comments on commit 2d44be5

Please sign in to comment.