Added a comme when displaying surname first: "Lastname, Firstname"

This commit is contained in:
JamesL813 2022-05-16 21:53:29 -04:00
parent 6f83def862
commit bbf2c45c09
1 changed files with 1 additions and 1 deletions

View File

@ -108,7 +108,7 @@ data class Contact(
fun getNameToDisplay(): String { fun getNameToDisplay(): String {
val firstMiddle = "$firstName $middleName".trim() val firstMiddle = "$firstName $middleName".trim()
val firstPart = if (startWithSurname) if (surname.isNotEmpty()) "$surname," else "" else firstMiddle //TODO val firstPart = if (startWithSurname) if (surname.isNotEmpty()) "$surname," else "" 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()