Fetch less

This commit is contained in:
M66B 2022-01-21 12:36:40 +01:00
parent da098e32ed
commit 6b0199d964
1 changed files with 3 additions and 11 deletions

View File

@ -1591,18 +1591,10 @@ class Core {
List<EntityRule> rules = db.rule().getEnabledRules(folder.id);
FetchProfile fp = new FetchProfile();
fp.add(FetchProfile.Item.ENVELOPE);
fp.add(FetchProfile.Item.FLAGS);
fp.add(FetchProfile.Item.CONTENT_INFO); // body structure
//fp.add(UIDFolder.FetchProfileItem.UID);
//fp.add(IMAPFolder.FetchProfileItem.HEADERS);
//fp.add(IMAPFolder.FetchProfileItem.MESSAGE);
fp.add(FetchProfile.Item.SIZE);
fp.add(IMAPFolder.FetchProfileItem.INTERNALDATE);
if (account.isGmail()) {
fp.add(GmailFolder.FetchProfileItem.THRID);
fp.add(UIDFolder.FetchProfileItem.UID); // To check if message exists
fp.add(FetchProfile.Item.FLAGS); // To update existing messages
if (account.isGmail())
fp.add(GmailFolder.FetchProfileItem.LABELS);
}
ifolder.fetch(new Message[]{imessage}, fp);
EntityMessage message = synchronizeMessage(context, account, folder, istore, ifolder, imessage, false, download, rules, state, stats);