show contact email as its name, if real name and oganization are empty
This commit is contained in:
parent
f1ab9b1e0f
commit
f6347db55d
|
@ -86,9 +86,13 @@ data class Contact(val id: Int, var prefix: String, var firstName: String, var m
|
|||
val suffixComma = if (suffix.isEmpty()) "" else ", $suffix"
|
||||
val fullName = "$prefix $firstPart $lastPart$suffixComma".trim()
|
||||
return if (fullName.isEmpty()) {
|
||||
if (organization.isEmpty()) {
|
||||
emails.firstOrNull()?.value ?: ""
|
||||
} else {
|
||||
var fullOrganization = if (organization.jobPosition.isEmpty()) "" else "${organization.jobPosition}, "
|
||||
fullOrganization += organization.company
|
||||
fullOrganization.trim().trimEnd(',')
|
||||
}
|
||||
} else {
|
||||
fullName
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue