diff --git a/app/src/main/java/eu/faircode/email/EntityRule.java b/app/src/main/java/eu/faircode/email/EntityRule.java index 3c65eceb61..bf675e421a 100644 --- a/app/src/main/java/eu/faircode/email/EntityRule.java +++ b/app/src/main/java/eu/faircode/email/EntityRule.java @@ -125,10 +125,14 @@ public class EntityRule { private static ExecutorService executor = Helper.getBackgroundExecutor(1, "rule"); static boolean needsHeaders(List rules) { + return needs(rules, "header"); + } + + private static boolean needs(List rules, String what) { for (EntityRule rule : rules) try { JSONObject jcondition = new JSONObject(rule.condition); - if (jcondition.has("header")) + if (jcondition.has(what)) return true; } catch (Throwable ex) { Log.e(ex);