Merge pull request #5357 from vector-im/cgizard/ISSUE-5326

[Export e2ee keys] use appName instead of element
This commit is contained in:
Benoit Marty 2022-02-25 12:03:56 +01:00 committed by GitHub
commit b8a0aa724e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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).replace(" ", "-")
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).replace(" ", "-")
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)
)
}