mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-03 13:44:40 +00:00
Small improvement
This commit is contained in:
parent
ef56231855
commit
228e6b4dc9
1 changed files with 5 additions and 6 deletions
|
@ -1075,13 +1075,12 @@ public abstract class DB extends RoomDatabase {
|
|||
}
|
||||
for (int i = 0; i < jaddresses.length(); i++) {
|
||||
JSONObject jaddress = (JSONObject) jaddresses.get(i);
|
||||
if (jaddress.has("personal"))
|
||||
result.add(new InternetAddress(
|
||||
jaddress.getString("address"),
|
||||
jaddress.getString("personal")));
|
||||
String email = jaddress.getString("address");
|
||||
String personal = jaddress.optString("personal");
|
||||
if (TextUtils.isEmpty(personal))
|
||||
result.add(new InternetAddress(email));
|
||||
else
|
||||
result.add(new InternetAddress(
|
||||
jaddress.getString("address")));
|
||||
result.add(new InternetAddress(email, personal));
|
||||
}
|
||||
} catch (Throwable ex) {
|
||||
// Compose can store invalid addresses
|
||||
|
|
Loading…
Reference in a new issue