mirror of https://github.com/M66B/FairEmail.git
Format inserted addresses
This commit is contained in:
parent
164e37054e
commit
3e46a63d2f
|
@ -958,14 +958,12 @@ public class FragmentCompose extends FragmentBase {
|
||||||
|
|
||||||
String name = cursor.getString(colName);
|
String name = cursor.getString(colName);
|
||||||
String email = MessageHelper.sanitizeEmail(cursor.getString(colEmail));
|
String email = MessageHelper.sanitizeEmail(cursor.getString(colEmail));
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
if (name == null || !suggest_names)
|
if (name == null || !suggest_names)
|
||||||
sb.append(email);
|
return email;
|
||||||
else {
|
else {
|
||||||
sb.append("\"").append(name).append("\" ");
|
Address address = new InternetAddress(email, name, StandardCharsets.UTF_8.name());
|
||||||
sb.append("<").append(email).append(">");
|
return MessageHelper.formatAddressesCompose(new Address[]{address});
|
||||||
}
|
}
|
||||||
return sb.toString();
|
|
||||||
} catch (Throwable ex) {
|
} catch (Throwable ex) {
|
||||||
Log.e(ex);
|
Log.e(ex);
|
||||||
return ex.toString();
|
return ex.toString();
|
||||||
|
|
Loading…
Reference in New Issue