From 945e4b4f1d3b671d51060d64e9d6fc52f9529c93 Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 8 Nov 2021 12:46:20 +0100 Subject: [PATCH] Refactoring --- app/src/main/java/eu/faircode/email/FragmentDialogJunk.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentDialogJunk.java b/app/src/main/java/eu/faircode/email/FragmentDialogJunk.java index b1b69ecb50..912112650b 100644 --- a/app/src/main/java/eu/faircode/email/FragmentDialogJunk.java +++ b/app/src/main/java/eu/faircode/email/FragmentDialogJunk.java @@ -307,7 +307,7 @@ public class FragmentDialogJunk extends FragmentDialogBase { try { boolean common = false; - Address[] froms = InternetAddress.parseHeader(from, false); + Address[] froms = MessageHelper.parseAddresses(context, from); String email = (froms.length == 0 ? null : ((InternetAddress) froms[0]).getAddress()); int at = (email == null ? -1 : email.indexOf('@')); String domain = (at > 0 ? email.substring(at + 1).toLowerCase(Locale.ROOT) : null);