mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-02-24 15:17:37 +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 firstPart = if (startWithSurname) {
|
||||
if (surname.isNotEmpty() && firstMiddle.isNotEmpty()) {
|
||||
"$surname," } else { surname }
|
||||
} else { firstMiddle }
|
||||
"$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