Skip to content

Commit 3f9a378

Browse files
committed
Export formatted name in vcf
1 parent 293522d commit 3f9a378

File tree

1 file changed

+6
-0
lines changed
  • app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers

1 file changed

+6
-0
lines changed

app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/VcfExporter.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ class VcfExporter {
5151
val cards = ArrayList<VCard>()
5252
for (contact in contacts) {
5353
val card = VCard()
54+
55+
val formattedName = arrayOf(contact.prefix, contact.firstName, contact.middleName, contact.surname, contact.suffix)
56+
.filter { it.isNotEmpty() }
57+
.joinToString(separator = " ")
58+
card.formattedName = FormattedName(formattedName)
59+
5460
StructuredName().apply {
5561
prefixes.add(contact.prefix)
5662
given = contact.firstName

0 commit comments

Comments
 (0)