Poll user folders by default

pull/178/head
M66B 4 years ago
parent ed75e4d7cc
commit 793a085660

@ -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;

@ -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);

@ -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);
}

Loading…
Cancel
Save