From 3020eb2ba91f217cb49842a3ac17826afba9c545 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 26 Sep 2019 14:03:35 +0200 Subject: [PATCH] Borrow reply name from sender name --- app/src/main/java/eu/faircode/email/Core.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index 51561aa969..3d09d0d264 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -1907,6 +1907,16 @@ class Core { message.ui_ignored = seen; message.ui_browsed = browsed; + // Borrow reply name from sender name + if (message.from != null && message.from.length == 1 && + message.reply != null && message.reply.length == 1) { + InternetAddress reply = (InternetAddress) message.reply[0]; + if (TextUtils.isEmpty(reply.getPersonal())) { + InternetAddress from = (InternetAddress) message.from[0]; + reply.setPersonal(from.getPersonal()); + } + } + EntityIdentity identity = matchIdentity(context, folder, message); message.identity = (identity == null ? null : identity.id);