Fixed address encoding

This commit is contained in:
M66B 2019-02-10 20:16:16 +00:00
parent 9006f0ffe9
commit 150bd4989f
2 changed files with 2 additions and 2 deletions

View File

@ -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());
} }

View File

@ -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())