From bbf2c45c09fd56e079997da6d83ee72edc0c61b9 Mon Sep 17 00:00:00 2001 From: JamesL813 Date: Mon, 16 May 2022 21:53:29 -0400 Subject: [PATCH] Added a comme when displaying surname first: "Lastname, Firstname" --- .../kotlin/com/simplemobiletools/contacts/pro/models/Contact.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/models/Contact.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/models/Contact.kt index 38191b6c..302e7d1d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/models/Contact.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/models/Contact.kt @@ -108,7 +108,7 @@ data class Contact( fun getNameToDisplay(): String { 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 suffixComma = if (suffix.isEmpty()) "" else ", $suffix" val fullName = "$prefix $firstPart $lastPart$suffixComma".trim()