diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index b7bb26ac44..c6bed8b349 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -1304,6 +1304,24 @@ class Core { return message; } + private static void runRules(Context context, IMAPMessage imessage, EntityMessage message, List rules) { + if (!Helper.isPro(context)) + return; + + DB db = DB.getInstance(context); + try { + for (EntityRule rule : rules) + if (rule.matches(context, message, imessage)) { + rule.execute(context, db, message); + if (rule.stop) + break; + } + } catch (Throwable ex) { + Log.e(ex); + db.message().setMessageError(message.id, Helper.formatThrowable(ex)); + } + } + private static void updateContactInfo(Context context, EntityFolder folder, EntityMessage message) { DB db = DB.getInstance(context); @@ -1360,24 +1378,6 @@ class Core { } } - private static void runRules(Context context, IMAPMessage imessage, EntityMessage message, List rules) { - if (!Helper.isPro(context)) - return; - - DB db = DB.getInstance(context); - try { - for (EntityRule rule : rules) - if (rule.matches(context, message, imessage)) { - rule.execute(context, db, message); - if (rule.stop) - break; - } - } catch (Throwable ex) { - Log.e(ex); - db.message().setMessageError(message.id, Helper.formatThrowable(ex)); - } - } - static void downloadMessage( Context context, EntityFolder folder, IMAPFolder ifolder,