mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-30 19:56:10 +00:00
Reduced default chunk size
This commit is contained in:
parent
b199f26be5
commit
f72b48d635
2 changed files with 5 additions and 6 deletions
|
@ -138,7 +138,7 @@ import javax.mail.search.SentDateTerm;
|
|||
import me.leolin.shortcutbadger.ShortcutBadger;
|
||||
|
||||
class Core {
|
||||
static final int DEFAULT_CHUNCK_SIZE = 100;
|
||||
static final int DEFAULT_CHUNK_SIZE = 50;
|
||||
|
||||
private static final int MAX_NOTIFICATION_DISPLAY = 10; // per group
|
||||
private static final int MAX_NOTIFICATION_COUNT = 100; // per group
|
||||
|
@ -2579,7 +2579,7 @@ class Core {
|
|||
imessage.setFlag(Flags.Flag.DELETED, true);
|
||||
} else {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
int chunk_size = prefs.getInt("chunk_size", DEFAULT_CHUNCK_SIZE);
|
||||
int chunk_size = prefs.getInt("chunk_size", DEFAULT_CHUNK_SIZE);
|
||||
|
||||
Flags flags = new Flags(Flags.Flag.DELETED);
|
||||
for (List<Message> list : Helper.chunkList(idelete, chunk_size))
|
||||
|
@ -3320,7 +3320,7 @@ class Core {
|
|||
ranges.add(new Pair<>(first, last < 0 ? first : last));
|
||||
|
||||
// https://datatracker.ietf.org/doc/html/rfc2683#section-3.2.1.5
|
||||
int chunk_size = prefs.getInt("chunk_size", DEFAULT_CHUNCK_SIZE);
|
||||
int chunk_size = prefs.getInt("chunk_size", DEFAULT_CHUNK_SIZE);
|
||||
if (chunk_size < 200 &&
|
||||
(account.isGmail() || account.isOutlook()))
|
||||
chunk_size = 200;
|
||||
|
@ -4341,7 +4341,7 @@ class Core {
|
|||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
boolean perform_expunge = prefs.getBoolean("perform_expunge", true);
|
||||
boolean uid_expunge = prefs.getBoolean("uid_expunge", false);
|
||||
int chunk_size = prefs.getInt("chunk_size", DEFAULT_CHUNCK_SIZE);
|
||||
int chunk_size = prefs.getInt("chunk_size", DEFAULT_CHUNK_SIZE);
|
||||
|
||||
if (!perform_expunge)
|
||||
return false;
|
||||
|
|
|
@ -31,7 +31,6 @@ import android.content.pm.PermissionInfo;
|
|||
import android.database.sqlite.SQLiteDatabaseCorruptException;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Typeface;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Debug;
|
||||
|
@ -1433,7 +1432,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
|||
Helper.humanReadableByteCount(cache_size * 1024L)));
|
||||
sbSqliteCache.setProgress(sqlite_cache);
|
||||
|
||||
int chunk_size = prefs.getInt("chunk_size", Core.DEFAULT_CHUNCK_SIZE);
|
||||
int chunk_size = prefs.getInt("chunk_size", Core.DEFAULT_CHUNK_SIZE);
|
||||
tvChunkSize.setText(getString(R.string.title_advanced_chunk_size, chunk_size));
|
||||
sbChunkSize.setProgress(chunk_size);
|
||||
|
||||
|
|
Loading…
Reference in a new issue