use appName instead of "element" in e2ee file name

This commit is contained in:
Claire G 2022-02-23 17:45:54 +01:00
parent 9e9dc1defd
commit f63cd57567
2 changed files with 5 additions and 2 deletions

1
changelog.d/5326.misc Normal file
View file

@ -0,0 +1 @@
[Export e2ee keys] use appName instead of element

View file

@ -169,22 +169,24 @@ const val POP_BACK_STACK_EXCLUSIVE = 0
fun Fragment.queryExportKeys(userId: String, activityResultLauncher: ActivityResultLauncher<Intent>) {
val timestamp = SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()).format(Date())
val appName = getString(R.string.app_name)
selectTxtFileToWrite(
activity = requireActivity(),
activityResultLauncher = activityResultLauncher,
defaultFileName = "element-megolm-export-$userId-$timestamp.txt",
defaultFileName = "$appName-megolm-export-$userId-$timestamp.txt",
chooserHint = getString(R.string.keys_backup_setup_step1_manual_export)
)
}
fun Activity.queryExportKeys(userId: String, activityResultLauncher: ActivityResultLauncher<Intent>) {
val timestamp = SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()).format(Date())
val appName = getString(R.string.app_name)
selectTxtFileToWrite(
activity = this,
activityResultLauncher = activityResultLauncher,
defaultFileName = "element-megolm-export-$userId-$timestamp.txt",
defaultFileName = "$appName-megolm-export-$userId-$timestamp.txt",
chooserHint = getString(R.string.keys_backup_setup_step1_manual_export)
)
}