fix #123, show the business as contact name if only that is filled
This commit is contained in:
parent
8c0ca77ed2
commit
4f97fce695
1 changed files with 8 additions and 1 deletions
|
|
@ -72,6 +72,13 @@ data class Contact(val id: Int, var prefix: String, var firstName: String, var m
|
||||||
|
|
||||||
val lastPart = if (startWithSurname) firstName else surname
|
val lastPart = if (startWithSurname) firstName else surname
|
||||||
val suffixComma = if (suffix.isEmpty()) "" else ", $suffix"
|
val suffixComma = if (suffix.isEmpty()) "" else ", $suffix"
|
||||||
return "$prefix $firstPart $lastPart$suffixComma".trim()
|
val fullName = "$prefix $firstPart $lastPart$suffixComma".trim()
|
||||||
|
return if (fullName.isEmpty()) {
|
||||||
|
var fullOrganization = if (organization.jobPosition.isEmpty()) "" else "${organization.jobPosition}, "
|
||||||
|
fullOrganization += organization.company
|
||||||
|
fullOrganization.trim().trimEnd(',')
|
||||||
|
} else {
|
||||||
|
fullName
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue