From 5e72fca15e3f01907ee5a9d548a725a043edf41c Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 8 Jan 2022 16:47:13 +0100 Subject: [PATCH] Common reference --- .../main/java/eu/faircode/email/MessageHelper.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/MessageHelper.java b/app/src/main/java/eu/faircode/email/MessageHelper.java index 0b75de8b80..f0b00140ab 100644 --- a/app/src/main/java/eu/faircode/email/MessageHelper.java +++ b/app/src/main/java/eu/faircode/email/MessageHelper.java @@ -1340,6 +1340,13 @@ public class MessageHelper { } } + // Common reference + if (thread == null && refs.size() > 0) { + String ref = refs.get(0); + if (!Objects.equals(ref, msgid)) + thread = ref; + } + if (thread == null) thread = getHash() + ":" + uid; @@ -1422,6 +1429,13 @@ public class MessageHelper { } } + // Common reference + if (thread == null && refs.size() > 0) { + String ref = refs.get(0); + if (!Objects.equals(ref, msgid)) + thread = ref; + } + if (thread == null) thread = getHash() + ":" + uid;