mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-02-24 15:17:37 +01:00
Separated line with brackets for readability
This commit is contained in:
parent
fcbbd7bd15
commit
8a6a51db04
@ -108,7 +108,10 @@ data class Contact(
|
||||
|
||||
fun getNameToDisplay(): String {
|
||||
val firstMiddle = "$firstName $middleName".trim()
|
||||
val firstPart = if (startWithSurname) if (surname.isNotEmpty() && firstMiddle.isNotEmpty()) "$surname," else surname else firstMiddle
|
||||
val firstPart = if (startWithSurname) {
|
||||
if (surname.isNotEmpty() && firstMiddle.isNotEmpty()) {
|
||||
"$surname," } else { surname }
|
||||
} else { firstMiddle }
|
||||
val lastPart = if (startWithSurname) firstMiddle else surname
|
||||
val suffixComma = if (suffix.isEmpty()) "" else ", $suffix"
|
||||
val fullName = "$prefix $firstPart $lastPart$suffixComma".trim()
|
||||
|
Loading…
x
Reference in New Issue
Block a user