feat #2810 - fix export config file name (#3000)

pull/3001/head
DaneEvans 2025-09-07 00:40:37 +10:00 zatwierdzone przez GitHub
rodzic 266379c979
commit 93e7eb3aa0
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -135,11 +135,15 @@ fun SettingsScreen(
viewModel.installProfile(it)
} else {
deviceProfile = it
val nodeName = it.shortName.ifBlank { "node" }
val dateFormat = java.text.SimpleDateFormat("yyyyMMdd", java.util.Locale.getDefault())
val dateStr = dateFormat.format(java.util.Date())
val fileName = "Meshtastic_${nodeName}_${dateStr}_nodeConfig.cfg"
val intent =
Intent(Intent.ACTION_CREATE_DOCUMENT).apply {
addCategory(Intent.CATEGORY_OPENABLE)
type = "application/*"
putExtra(Intent.EXTRA_TITLE, "device_profile.cfg")
putExtra(Intent.EXTRA_TITLE, fileName)
}
exportConfigLauncher.launch(intent)
}