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