Fixed address encoding

pull/147/head
M66B 6 years ago
parent 9006f0ffe9
commit 150bd4989f

@ -749,7 +749,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
try { try {
InternetAddress via = new InternetAddress(message.identityEmail, message.identityName); InternetAddress via = new InternetAddress(message.identityEmail, message.identityName);
tvIdentity.setText(via.toString()); tvIdentity.setText(MessageHelper.formatAddresses(new Address[]{via}));
} catch (UnsupportedEncodingException ex) { } catch (UnsupportedEncodingException ex) {
tvIdentity.setText(ex.getMessage()); tvIdentity.setText(ex.getMessage());
} }

@ -73,7 +73,7 @@ public class ContactInfo {
return new ContactInfo(); return new ContactInfo();
InternetAddress address = (InternetAddress) addresses[0]; InternetAddress address = (InternetAddress) addresses[0];
String key = address.toString(); String key = MessageHelper.formatAddresses(new Address[]{address});
synchronized (emailContactInfo) { synchronized (emailContactInfo) {
ContactInfo info = emailContactInfo.get(key); ContactInfo info = emailContactInfo.get(key);
if (info != null && !info.isExpired()) if (info != null && !info.isExpired())

Loading…
Cancel
Save