diff --git a/app/src/main/java/eu/faircode/email/MessageClassifier.java b/app/src/main/java/eu/faircode/email/MessageClassifier.java index a59ea254f3..9c8fd94f98 100644 --- a/app/src/main/java/eu/faircode/email/MessageClassifier.java +++ b/app/src/main/java/eu/faircode/email/MessageClassifier.java @@ -275,7 +275,9 @@ public class MessageClassifier { }); String classification = null; - if (chances.get(0).chance / chances.get(1).chance >= CHANCE_THRESHOLD) + double maxChance = chances.get(0).chance; + double minChance = chances.get(chances.size() - 1).chance; + if (maxChance / minChance >= CHANCE_THRESHOLD) classification = chances.get(0).clazz; Log.i("Classifier classify=" + classify + " classified=" + classification);