From 5593ae72692b5b30327dfb1bee6bb6d9bb6de679 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 1 Oct 2019 09:36:08 +0200 Subject: [PATCH] Workaround invalid priorities --- app/src/main/java/eu/faircode/email/MessageHelper.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/MessageHelper.java b/app/src/main/java/eu/faircode/email/MessageHelper.java index 671d145850..d9e0fb576b 100644 --- a/app/src/main/java/eu/faircode/email/MessageHelper.java +++ b/app/src/main/java/eu/faircode/email/MessageHelper.java @@ -482,6 +482,12 @@ public class MessageHelper { if (header == null) header = imessage.getHeader("X-MSMail-Priority", null); + if (header != null) { + int sp = header.indexOf(" "); + if (sp >= 0) + header = header.substring(0, sp); // "2 (High)" + } + if ("high".equalsIgnoreCase(header) || "urgent".equalsIgnoreCase(header)) priority = EntityMessage.PRIORITIY_HIGH; else if ("normal".equalsIgnoreCase(header) || "medium".equalsIgnoreCase(header))