mirror of
				https://github.com/SimpleMobileTools/Simple-Contacts.git
				synced 2025-06-05 21:59:27 +02:00 
			
		
		
		
	Export formatted name in vcf
This commit is contained in:
		| @@ -51,6 +51,12 @@ class VcfExporter { | |||||||
|             val cards = ArrayList<VCard>() |             val cards = ArrayList<VCard>() | ||||||
|             for (contact in contacts) { |             for (contact in contacts) { | ||||||
|                 val card = VCard() |                 val card = VCard() | ||||||
|  |  | ||||||
|  |                 val formattedName = arrayOf(contact.prefix, contact.firstName, contact.middleName, contact.surname, contact.suffix) | ||||||
|  |                     .filter { it.isNotEmpty() } | ||||||
|  |                     .joinToString(separator = " ") | ||||||
|  |                 card.formattedName = FormattedName(formattedName) | ||||||
|  |  | ||||||
|                 StructuredName().apply { |                 StructuredName().apply { | ||||||
|                     prefixes.add(contact.prefix) |                     prefixes.add(contact.prefix) | ||||||
|                     given = contact.firstName |                     given = contact.firstName | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user