From 608292a357e9870952c3b798a3df2cec11c3f810 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 22 Oct 2017 22:57:53 +0200 Subject: [PATCH] update Commons and use its way of getting mimetype of multiple uris --- app/build.gradle | 2 +- .../kotlin/com/simplemobiletools/gallery/extensions/activity.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index d09181550..3d9d663c6 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -37,7 +37,7 @@ android { } dependencies { - compile 'com.simplemobiletools:commons:2.30.6' + compile 'com.simplemobiletools:commons:2.30.13' compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.6.0' compile 'com.theartofdev.edmodo:android-image-cropper:2.4.0' compile 'com.bignerdranch.android:recyclerview-multiselect:0.2' diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/activity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/activity.kt index 0a2140a6d..75e291505 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/activity.kt @@ -65,7 +65,7 @@ fun Activity.shareMedia(media: List) { Intent().apply { action = Intent.ACTION_SEND_MULTIPLE - type = "image/* video/*" + type = uris.getMimeType() addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION) putParcelableArrayListExtra(Intent.EXTRA_STREAM, uris) startActivity(Intent.createChooser(this, shareTitle))