mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-29 11:15:51 +00:00
Small improvement
This commit is contained in:
parent
843cd61e51
commit
62e58bd683
3 changed files with 17 additions and 14 deletions
|
@ -110,7 +110,7 @@ public class EntityFolder implements Serializable {
|
|||
static final String USER = "User";
|
||||
|
||||
// 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",
|
||||
"Archive",
|
||||
"Drafts",
|
||||
|
@ -119,8 +119,8 @@ public class EntityFolder implements Serializable {
|
|||
"Sent",
|
||||
"Important",
|
||||
"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,
|
||||
DRAFTS,
|
||||
|
@ -129,9 +129,9 @@ public class EntityFolder implements Serializable {
|
|||
SENT,
|
||||
SYSTEM, // Important
|
||||
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,
|
||||
OUTBOX,
|
||||
DRAFTS,
|
||||
|
@ -141,28 +141,28 @@ public class EntityFolder implements Serializable {
|
|||
JUNK,
|
||||
SYSTEM,
|
||||
USER
|
||||
);
|
||||
));
|
||||
|
||||
static final int DEFAULT_INIT = 14; // days
|
||||
static final int DEFAULT_SYNC = 7; // 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,
|
||||
DRAFTS,
|
||||
SENT,
|
||||
ARCHIVE,
|
||||
TRASH,
|
||||
JUNK
|
||||
);
|
||||
static final List<Boolean> SYSTEM_FOLDER_DOWNLOAD = Arrays.asList(
|
||||
));
|
||||
static final List<Boolean> SYSTEM_FOLDER_DOWNLOAD = Collections.unmodifiableList(Arrays.asList(
|
||||
true, // inbox
|
||||
true, // drafts
|
||||
false, // sent
|
||||
false, // archive
|
||||
false, // trash
|
||||
false // junk
|
||||
); // MUST match SYSTEM_FOLDER_SYNC
|
||||
)); // MUST match SYSTEM_FOLDER_SYNC
|
||||
|
||||
public EntityFolder() {
|
||||
}
|
||||
|
|
|
@ -175,7 +175,7 @@ public class FragmentMessages extends FragmentBase {
|
|||
private static final int UNDO_TIMEOUT = 5000; // 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.OUTBOX,
|
||||
EntityFolder.DRAFTS,
|
||||
|
@ -185,7 +185,7 @@ public class FragmentMessages extends FragmentBase {
|
|||
EntityFolder.SYSTEM,
|
||||
EntityFolder.USER,
|
||||
EntityFolder.ARCHIVE
|
||||
);
|
||||
));
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
|
|
|
@ -52,6 +52,7 @@ import java.io.InputStream;
|
|||
import java.io.OutputStream;
|
||||
import java.net.URL;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
|
||||
|
@ -67,8 +68,10 @@ public class HtmlHelper {
|
|||
static final int PREVIEW_SIZE = 250;
|
||||
|
||||
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> tails = Arrays.asList("h1", "h2", "h3", "h4", "h5", "h6", "p", "ol", "ul", "li");
|
||||
private static final List<String> heads = Collections.unmodifiableList(Arrays.asList(
|
||||
"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) {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
|
|
Loading…
Reference in a new issue