mirror of https://github.com/M66B/FairEmail.git
Always fill in contact names again
This commit is contained in:
parent
fd223d6d4c
commit
2876e12c7f
|
@ -1058,21 +1058,18 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
ibAvatar.setTag(lookupUri);
|
||||
ibAvatar.setEnabled(lookupUri != null);
|
||||
|
||||
// Updating in message lists causes jitter
|
||||
if (viewType == ViewType.THREAD) {
|
||||
String displayName = info.getDisplayName();
|
||||
if (!TextUtils.isEmpty(displayName) &&
|
||||
addresses != null && addresses.length == 1) {
|
||||
String email = ((InternetAddress) addresses[0]).getAddress();
|
||||
String personal = ((InternetAddress) addresses[0]).getPersonal();
|
||||
if (TextUtils.isEmpty(personal) || !personal.equals(displayName))
|
||||
try {
|
||||
InternetAddress a = new InternetAddress(email, displayName);
|
||||
tvFrom.setText(MessageHelper.formatAddresses(new Address[]{a}, name_email, false));
|
||||
} catch (UnsupportedEncodingException ex) {
|
||||
Log.w(ex);
|
||||
}
|
||||
}
|
||||
String displayName = info.getDisplayName();
|
||||
if (!TextUtils.isEmpty(displayName) &&
|
||||
addresses != null && addresses.length == 1) {
|
||||
String email = ((InternetAddress) addresses[0]).getAddress();
|
||||
String personal = ((InternetAddress) addresses[0]).getPersonal();
|
||||
if (TextUtils.isEmpty(personal))
|
||||
try {
|
||||
InternetAddress a = new InternetAddress(email, displayName, StandardCharsets.UTF_8.name());
|
||||
tvFrom.setText(MessageHelper.formatAddresses(new Address[]{a}, name_email, false));
|
||||
} catch (UnsupportedEncodingException ex) {
|
||||
Log.w(ex);
|
||||
}
|
||||
}
|
||||
|
||||
if (distinguish_contacts && info.isKnown())
|
||||
|
|
Loading…
Reference in New Issue