From 469574a59891d05d218abc719853d41cf94860c5 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 13 Oct 2019 16:26:37 +0200 Subject: [PATCH] Refactoring --- app/src/main/java/eu/faircode/email/Core.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index ff8ee81715..d0d64363bb 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -2151,7 +2151,8 @@ class Core { Log.i(folder.name + " added id=" + message.id + " uid=" + message.uid); int sequence = 1; - for (EntityAttachment attachment : parts.getAttachments()) { + List attachments = parts.getAttachments(); + for (EntityAttachment attachment : attachments) { Log.i(folder.name + " attachment seq=" + sequence + " " + attachment); attachment.message = message.id; attachment.sequence = sequence++; @@ -2353,6 +2354,7 @@ class Core { } private static void runRules(Context context, Message imessage, EntityMessage message, List rules) { + if (!ActivityBilling.isPro(context)) return;