1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-29 11:15:51 +00:00

Poll user folders by default

This commit is contained in:
M66B 2020-04-20 07:28:31 +02:00
parent ed75e4d7cc
commit 793a085660
3 changed files with 6 additions and 8 deletions

View file

@ -1425,7 +1425,7 @@ class Core {
folder.type = (EntityFolder.SYSTEM.equals(type) ? type : EntityFolder.USER);
folder.synchronize = false;
folder.subscribed = subscribed;
folder.poll = account.shouldPoll();
folder.poll = true;
folder.sync_days = EntityFolder.DEFAULT_SYNC;
folder.keep_days = EntityFolder.DEFAULT_KEEP;
folder.selectable = selectable;

View file

@ -187,13 +187,6 @@ public class EntityAccount extends EntityOrder implements Serializable {
return new String[]{name, null};
}
boolean shouldPoll() {
// Gmail: Too many simultaneous connections
// Outlook: User is authenticated but not connected
return ("imap.gmail.com".equalsIgnoreCase(host) ||
"outlook.office365.com".equalsIgnoreCase(host));
}
public JSONObject toJSON() throws JSONException {
JSONObject json = new JSONObject();
json.put("id", id);

View file

@ -1155,23 +1155,28 @@ public class FragmentAccount extends FragmentBase {
if (drafts != null) {
drafts.type = EntityFolder.DRAFTS;
drafts.poll = false;
folders.add(drafts);
}
if (sent != null) {
sent.type = EntityFolder.SENT;
sent.poll = false;
folders.add(sent);
}
if (archive != null) {
archive.type = EntityFolder.ARCHIVE;
archive.poll = false;
folders.add(archive);
}
if (trash != null) {
trash.type = EntityFolder.TRASH;
trash.poll = false;
folders.add(trash);
}
if (junk != null) {
junk.type = EntityFolder.JUNK;
junk.poll = false;
folders.add(junk);
}