|
|
@ -214,6 +214,14 @@ public class EntityFolder extends EntityOrder implements Serializable {
|
|
|
|
TRASH,
|
|
|
|
TRASH,
|
|
|
|
JUNK
|
|
|
|
JUNK
|
|
|
|
));
|
|
|
|
));
|
|
|
|
|
|
|
|
private static final List<Boolean> SYSTEM_FOLDER_POLL = Collections.unmodifiableList(Arrays.asList(
|
|
|
|
|
|
|
|
false, // inbox
|
|
|
|
|
|
|
|
false, // drafts
|
|
|
|
|
|
|
|
false, // sent
|
|
|
|
|
|
|
|
false, // archive
|
|
|
|
|
|
|
|
true, // trash
|
|
|
|
|
|
|
|
true // junk
|
|
|
|
|
|
|
|
)); // MUST match SYSTEM_FOLDER_SYNC
|
|
|
|
private static final List<Boolean> SYSTEM_FOLDER_DOWNLOAD = Collections.unmodifiableList(Arrays.asList(
|
|
|
|
private static final List<Boolean> SYSTEM_FOLDER_DOWNLOAD = Collections.unmodifiableList(Arrays.asList(
|
|
|
|
true, // inbox
|
|
|
|
true, // inbox
|
|
|
|
true, // drafts
|
|
|
|
true, // drafts
|
|
|
@ -235,6 +243,7 @@ public class EntityFolder extends EntityOrder implements Serializable {
|
|
|
|
void setProperties() {
|
|
|
|
void setProperties() {
|
|
|
|
int sync = EntityFolder.SYSTEM_FOLDER_SYNC.indexOf(type);
|
|
|
|
int sync = EntityFolder.SYSTEM_FOLDER_SYNC.indexOf(type);
|
|
|
|
this.synchronize = (sync >= 0);
|
|
|
|
this.synchronize = (sync >= 0);
|
|
|
|
|
|
|
|
this.poll = (sync < 0 || EntityFolder.SYSTEM_FOLDER_POLL.get(sync));
|
|
|
|
this.download = (sync < 0 || EntityFolder.SYSTEM_FOLDER_DOWNLOAD.get(sync));
|
|
|
|
this.download = (sync < 0 || EntityFolder.SYSTEM_FOLDER_DOWNLOAD.get(sync));
|
|
|
|
|
|
|
|
|
|
|
|
this.sync_days = EntityFolder.DEFAULT_SYNC;
|
|
|
|
this.sync_days = EntityFolder.DEFAULT_SYNC;
|
|
|
@ -251,6 +260,11 @@ public class EntityFolder extends EntityOrder implements Serializable {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static boolean shouldPoll(String type) {
|
|
|
|
|
|
|
|
int sync = EntityFolder.SYSTEM_FOLDER_SYNC.indexOf(type);
|
|
|
|
|
|
|
|
return (sync < 0 || EntityFolder.SYSTEM_FOLDER_POLL.get(sync));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static EntityFolder getOutbox() {
|
|
|
|
static EntityFolder getOutbox() {
|
|
|
|
EntityFolder outbox = new EntityFolder();
|
|
|
|
EntityFolder outbox = new EntityFolder();
|
|
|
|
outbox.name = "OUTBOX";
|
|
|
|
outbox.name = "OUTBOX";
|
|
|
|