Use reply-to address for flags

This commit is contained in:
M66B 2023-07-20 08:20:11 +02:00
parent 18c05bcf92
commit f200ad7c0c
1 changed files with 6 additions and 4 deletions

View File

@ -1425,11 +1425,12 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
formatAddresses(senders, format, maxRecipients),
formatAddresses(recipients, format, maxRecipients)));
} else {
if (viewType == ViewType.THREAD)
if (outgoing || message.from == null || message.from.length == 0)
if (tld_flags && viewType == ViewType.THREAD) {
Address[] a = (message.reply == null || message.reply.length == 0 ? message.from : message.reply);
if (outgoing || a == null || a.length == 0)
tvFrom.setCompoundDrawablesRelative(null, null, null, null);
else if (tld_flags) {
String email = ((InternetAddress) message.from[0]).getAddress();
else {
String email = ((InternetAddress) a[0]).getAddress();
String domain = UriHelper.getEmailDomain(email);
String tld = UriHelper.getTld(context, domain);
int resid = context.getResources().getIdentifier(
@ -1437,6 +1438,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
Drawable d = (resid > 0 ? context.getDrawable(resid) : null);
tvFrom.setCompoundDrawablesRelativeWithIntrinsicBounds(d, null, null, null);
}
}
tvFrom.setText(MessageHelper.formatAddresses(senders, format, false));
}