mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-10-20 23:11:24 +02:00
fix(dialog): use parsed MIME type for Android save dialog (#3519)
This commit is contained in:
1 parent
dc7f87bc7e
commit
cc9ec9b4ad
2 files changed
+10
-3
No files matched your search
@@ -204,9 +204,10 @@ class DialogPlugin(private val activity: Activity): Plugin(activity) {
|
||||
val intent = Intent(Intent.ACTION_CREATE_DOCUMENT)
|
||||
intent.addCategory(Intent.CATEGORY_OPENABLE)
|
||||
intent.putExtra(Intent.EXTRA_TITLE, args.fileName ?: "")
|
||||
intent.type = "*/*"
|
||||
|
||||
if (parsedTypes.isNotEmpty()) {
|
||||
if (parsedTypes.size == 1) {
|
||||
intent.type = parsedTypes.first()
|
||||
} else {
|
||||
intent.type = "*/*"
|
||||
intent.putExtra(Intent.EXTRA_MIME_TYPES, parsedTypes)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user