From 086bc39e6d30a5bbd76a58c777059319587f0542 Mon Sep 17 00:00:00 2001 From: Juha Heinanen Date: Wed, 20 May 2026 16:09:31 +0300 Subject: [PATCH] Change name of exported contacts file to include date --- .../main/kotlin/com/tutpro/baresip/ContactsScreen.kt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/tutpro/baresip/ContactsScreen.kt b/app/src/main/kotlin/com/tutpro/baresip/ContactsScreen.kt index 7719d227..f7977c23 100644 --- a/app/src/main/kotlin/com/tutpro/baresip/ContactsScreen.kt +++ b/app/src/main/kotlin/com/tutpro/baresip/ContactsScreen.kt @@ -88,6 +88,9 @@ import java.io.ByteArrayOutputStream import java.io.File import java.io.FileOutputStream import java.io.IOException +import java.text.SimpleDateFormat +import java.util.Date +import java.util.Locale const val avatarSize: Int = 96 @@ -447,7 +450,12 @@ private fun ContactsScreen(navController: NavController) { return@DropdownMenu } if (name == export) { - vcfExportLauncher.launch("baresip_contacts.vcf") + val fileName = "contacts_" + + SimpleDateFormat( + "yyyy_MM_dd_HH_mm", + Locale.getDefault() + ).format(Date()) + ".vcf" + vcfExportLauncher.launch(fileName) return@DropdownMenu } if (name == delete) {