diff --git a/app/src/main/java/eu/faircode/email/BoundaryCallbackMessages.java b/app/src/main/java/eu/faircode/email/BoundaryCallbackMessages.java index 967faf18ed..766f54bec6 100644 --- a/app/src/main/java/eu/faircode/email/BoundaryCallbackMessages.java +++ b/app/src/main/java/eu/faircode/email/BoundaryCallbackMessages.java @@ -449,6 +449,7 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback rules = db.rule().getEnabledRules(folder.id); fp.add(FetchProfile.Item.ENVELOPE); - // fp.add(FetchProfile.Item.FLAGS); + //fp.add(FetchProfile.Item.FLAGS); fp.add(FetchProfile.Item.CONTENT_INFO); // body structure - // fp.add(UIDFolder.FetchProfileItem.UID); + //fp.add(UIDFolder.FetchProfileItem.UID); fp.add(IMAPFolder.FetchProfileItem.HEADERS); - // fp.add(IMAPFolder.FetchProfileItem.MESSAGE); + //fp.add(IMAPFolder.FetchProfileItem.MESSAGE); fp.add(FetchProfile.Item.SIZE); fp.add(IMAPFolder.FetchProfileItem.INTERNALDATE); @@ -2183,16 +2183,18 @@ class Core { if (fetch) { Log.i(folder.name + " fetching message id=" + message.id); - FetchProfile fp = new FetchProfile(); + // Fetch on demand to prevent OOM + + //FetchProfile fp = new FetchProfile(); //fp.add(FetchProfile.Item.ENVELOPE); //fp.add(FetchProfile.Item.FLAGS); - fp.add(FetchProfile.Item.CONTENT_INFO); // body structure + //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); - ifolder.fetch(new Message[]{imessage}, fp); + //ifolder.fetch(new Message[]{imessage}, fp); MessageHelper helper = new MessageHelper(imessage); MessageHelper.MessageParts parts = helper.getMessageParts();