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 suffixComma = if (suffix.isEmpty()) "" else ", $suffix"
|
||||||
val fullName = "$prefix $firstPart $lastPart$suffixComma".trim()
|
val fullName = "$prefix $firstPart $lastPart$suffixComma".trim()
|
||||||
return if (fullName.isEmpty()) {
|
return if (fullName.isEmpty()) {
|
||||||
var fullOrganization = if (organization.jobPosition.isEmpty()) "" else "${organization.jobPosition}, "
|
if (organization.isEmpty()) {
|
||||||
fullOrganization += organization.company
|
emails.firstOrNull()?.value ?: ""
|
||||||
fullOrganization.trim().trimEnd(',')
|
} else {
|
||||||
|
var fullOrganization = if (organization.jobPosition.isEmpty()) "" else "${organization.jobPosition}, "
|
||||||
|
fullOrganization += organization.company
|
||||||
|
fullOrganization.trim().trimEnd(',')
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
fullName
|
fullName
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue