mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-02-24 23:27:40 +01:00
More lines for readability
This commit is contained in:
parent
8a6a51db04
commit
4c4b69b80f
@ -110,8 +110,13 @@ data class Contact(
|
|||||||
val firstMiddle = "$firstName $middleName".trim()
|
val firstMiddle = "$firstName $middleName".trim()
|
||||||
val firstPart = if (startWithSurname) {
|
val firstPart = if (startWithSurname) {
|
||||||
if (surname.isNotEmpty() && firstMiddle.isNotEmpty()) {
|
if (surname.isNotEmpty() && firstMiddle.isNotEmpty()) {
|
||||||
"$surname," } else { surname }
|
"$surname,"
|
||||||
} else { firstMiddle }
|
} else {
|
||||||
|
surname
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
firstMiddle
|
||||||
|
}
|
||||||
val lastPart = if (startWithSurname) firstMiddle else surname
|
val lastPart = if (startWithSurname) firstMiddle else surname
|
||||||
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()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user