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 675f67b2b..d38c06865 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/activity.kt @@ -42,17 +42,8 @@ fun Activity.shareUri(uri: Uri) { } fun Activity.shareMedium(medium: Medium) { - val shareTitle = resources.getString(R.string.share_via) val file = File(medium.path) - val uri = getFilePublicUri(file, BuildConfig.APPLICATION_ID) - - Intent().apply { - action = Intent.ACTION_SEND - putExtra(Intent.EXTRA_STREAM, uri) - type = getMimeTypeFromUri(uri) - addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION) - startActivity(Intent.createChooser(this, shareTitle)) - } + shareUri(Uri.fromFile(file)) } fun Activity.shareMedia(media: List) {