1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-01 04:35:57 +00:00

Small improvement

This commit is contained in:
M66B 2019-03-14 19:33:01 +00:00
parent 843cd61e51
commit 62e58bd683
3 changed files with 17 additions and 14 deletions

View file

@ -110,7 +110,7 @@ public class EntityFolder implements Serializable {
static final String USER = "User"; static final String USER = "User";
// https://www.iana.org/assignments/imap-mailbox-name-attributes/imap-mailbox-name-attributes.xhtml // https://www.iana.org/assignments/imap-mailbox-name-attributes/imap-mailbox-name-attributes.xhtml
private static final List<String> SYSTEM_FOLDER_ATTR = Arrays.asList( private static final List<String> SYSTEM_FOLDER_ATTR = Collections.unmodifiableList(Arrays.asList(
"All", "All",
"Archive", "Archive",
"Drafts", "Drafts",
@ -119,8 +119,8 @@ public class EntityFolder implements Serializable {
"Sent", "Sent",
"Important", "Important",
"Flagged" "Flagged"
); ));
private static final List<String> SYSTEM_FOLDER_TYPE = Arrays.asList( private static final List<String> SYSTEM_FOLDER_TYPE = Collections.unmodifiableList(Arrays.asList(
ARCHIVE, // All ARCHIVE, // All
ARCHIVE, ARCHIVE,
DRAFTS, DRAFTS,
@ -129,9 +129,9 @@ public class EntityFolder implements Serializable {
SENT, SENT,
SYSTEM, // Important SYSTEM, // Important
SYSTEM // Flagged SYSTEM // Flagged
); // MUST match SYSTEM_FOLDER_ATTR )); // MUST match SYSTEM_FOLDER_ATTR
static final List<String> FOLDER_SORT_ORDER = Arrays.asList( static final List<String> FOLDER_SORT_ORDER = Collections.unmodifiableList(Arrays.asList(
INBOX, INBOX,
OUTBOX, OUTBOX,
DRAFTS, DRAFTS,
@ -141,28 +141,28 @@ public class EntityFolder implements Serializable {
JUNK, JUNK,
SYSTEM, SYSTEM,
USER USER
); ));
static final int DEFAULT_INIT = 14; // days static final int DEFAULT_INIT = 14; // days
static final int DEFAULT_SYNC = 7; // days static final int DEFAULT_SYNC = 7; // days
static final int DEFAULT_KEEP = 30; // days static final int DEFAULT_KEEP = 30; // days
static final List<String> SYSTEM_FOLDER_SYNC = Arrays.asList( static final List<String> SYSTEM_FOLDER_SYNC = Collections.unmodifiableList(Arrays.asList(
INBOX, INBOX,
DRAFTS, DRAFTS,
SENT, SENT,
ARCHIVE, ARCHIVE,
TRASH, TRASH,
JUNK JUNK
); ));
static final List<Boolean> SYSTEM_FOLDER_DOWNLOAD = Arrays.asList( static final List<Boolean> SYSTEM_FOLDER_DOWNLOAD = Collections.unmodifiableList(Arrays.asList(
true, // inbox true, // inbox
true, // drafts true, // drafts
false, // sent false, // sent
false, // archive false, // archive
false, // trash false, // trash
false // junk false // junk
); // MUST match SYSTEM_FOLDER_SYNC )); // MUST match SYSTEM_FOLDER_SYNC
public EntityFolder() { public EntityFolder() {
} }

View file

@ -175,7 +175,7 @@ public class FragmentMessages extends FragmentBase {
private static final int UNDO_TIMEOUT = 5000; // milliseconds private static final int UNDO_TIMEOUT = 5000; // milliseconds
private static final int SWIPE_DISABLE_SELECT_DURATION = 1500; // milliseconds private static final int SWIPE_DISABLE_SELECT_DURATION = 1500; // milliseconds
private static final List<String> DUPLICATE_ORDER = Arrays.asList( private static final List<String> DUPLICATE_ORDER = Collections.unmodifiableList(Arrays.asList(
EntityFolder.INBOX, EntityFolder.INBOX,
EntityFolder.OUTBOX, EntityFolder.OUTBOX,
EntityFolder.DRAFTS, EntityFolder.DRAFTS,
@ -185,7 +185,7 @@ public class FragmentMessages extends FragmentBase {
EntityFolder.SYSTEM, EntityFolder.SYSTEM,
EntityFolder.USER, EntityFolder.USER,
EntityFolder.ARCHIVE EntityFolder.ARCHIVE
); ));
@Override @Override
public void onCreate(Bundle savedInstanceState) { public void onCreate(Bundle savedInstanceState) {

View file

@ -52,6 +52,7 @@ import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.net.URL; import java.net.URL;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.regex.Matcher; import java.util.regex.Matcher;
@ -67,8 +68,10 @@ public class HtmlHelper {
static final int PREVIEW_SIZE = 250; static final int PREVIEW_SIZE = 250;
private static final int TRACKING_PIXEL_SURFACE = 25; private static final int TRACKING_PIXEL_SURFACE = 25;
private static final List<String> heads = Arrays.asList("h1", "h2", "h3", "h4", "h5", "h6", "p", "table", "ol", "ul", "br", "hr"); private static final List<String> heads = Collections.unmodifiableList(Arrays.asList(
private static final List<String> tails = Arrays.asList("h1", "h2", "h3", "h4", "h5", "h6", "p", "ol", "ul", "li"); "h1", "h2", "h3", "h4", "h5", "h6", "p", "ol", "ul", "table", "br", "hr"));
private static final List<String> tails = Collections.unmodifiableList(Arrays.asList(
"h1", "h2", "h3", "h4", "h5", "h6", "p", "ol", "ul", "li"));
static String removeTracking(Context context, String html) { static String removeTracking(Context context, String html) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);