mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-28 11:55:20 +01:00
Suppress first name with initials only
This commit is contained in:
@@ -94,6 +94,20 @@ public class EntityAnswer implements Serializable {
|
||||
}
|
||||
}
|
||||
|
||||
if (fullName != null && !fullName.equals(first)) {
|
||||
String[] parts = first.split("\\.");
|
||||
if (parts != null && parts.length > 0) {
|
||||
boolean initials = true;
|
||||
for (String part : parts)
|
||||
if (part.trim().length() > 1) {
|
||||
initials = false;
|
||||
break;
|
||||
}
|
||||
if (initials)
|
||||
first = null;
|
||||
}
|
||||
}
|
||||
|
||||
text = text.replace("$name$", fullName == null ? "" : fullName);
|
||||
text = text.replace("$firstname$", first == null ? "" : first);
|
||||
text = text.replace("$lastname$", last == null ? "" : last);
|
||||
|
||||
Reference in New Issue
Block a user