Glimpse: Set extra mime types in shareIntent()
Change-Id: I5b86fbc788dc5fb1da073a500868ac2e3683ad65
This commit is contained in:
parent
020ea47a06
commit
50b56e82b8
|
@ -19,7 +19,10 @@ fun Intent.shareIntent(vararg medias: Media) = apply {
|
|||
type = when {
|
||||
medias.all { it.mediaType == IMAGE } -> "image/*"
|
||||
medias.all { it.mediaType == VIDEO } -> "video/*"
|
||||
else -> "*/*"
|
||||
else -> {
|
||||
putExtra(Intent.EXTRA_MIME_TYPES, arrayOf("image/*", "video/*"))
|
||||
"*/*"
|
||||
}
|
||||
}
|
||||
flags = Intent.FLAG_GRANT_READ_URI_PERMISSION
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue