mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-29 00:51:44 +01:00
Small improvement
This commit is contained in:
@@ -76,11 +76,15 @@ public class EntityAnswer implements Serializable {
|
||||
name = name.trim();
|
||||
int c = name.lastIndexOf(",");
|
||||
if (c < 0) {
|
||||
first = name;
|
||||
last = name;
|
||||
c = name.lastIndexOf(" ");
|
||||
if (c < 0) {
|
||||
first = name;
|
||||
last = name;
|
||||
} else {
|
||||
first = name.substring(0, c).trim();
|
||||
last = name.substring(c + 1).trim();
|
||||
}
|
||||
} else {
|
||||
first = name.substring(c + 1).trim();
|
||||
last = name.substring(0, c).trim();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user