Always fill in contact names again

pull/170/head
M66B 6 years ago
parent fd223d6d4c
commit 2876e12c7f

@ -1058,21 +1058,18 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
ibAvatar.setTag(lookupUri); ibAvatar.setTag(lookupUri);
ibAvatar.setEnabled(lookupUri != null); ibAvatar.setEnabled(lookupUri != null);
// Updating in message lists causes jitter String displayName = info.getDisplayName();
if (viewType == ViewType.THREAD) { if (!TextUtils.isEmpty(displayName) &&
String displayName = info.getDisplayName(); addresses != null && addresses.length == 1) {
if (!TextUtils.isEmpty(displayName) && String email = ((InternetAddress) addresses[0]).getAddress();
addresses != null && addresses.length == 1) { String personal = ((InternetAddress) addresses[0]).getPersonal();
String email = ((InternetAddress) addresses[0]).getAddress(); if (TextUtils.isEmpty(personal))
String personal = ((InternetAddress) addresses[0]).getPersonal(); try {
if (TextUtils.isEmpty(personal) || !personal.equals(displayName)) InternetAddress a = new InternetAddress(email, displayName, StandardCharsets.UTF_8.name());
try { tvFrom.setText(MessageHelper.formatAddresses(new Address[]{a}, name_email, false));
InternetAddress a = new InternetAddress(email, displayName); } catch (UnsupportedEncodingException ex) {
tvFrom.setText(MessageHelper.formatAddresses(new Address[]{a}, name_email, false)); Log.w(ex);
} catch (UnsupportedEncodingException ex) { }
Log.w(ex);
}
}
} }
if (distinguish_contacts && info.isKnown()) if (distinguish_contacts && info.isKnown())

Loading…
Cancel
Save