diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt index c0b026892..986f7a9e0 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt @@ -162,9 +162,9 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList, } private fun shareMedia() { - if (selectedPositions.size <= 1) { + if (selectedPositions.size == 1 && selectedPositions.first() != -1) { activity.shareMedium(getSelectedMedia()[0]) - } else { + } else if (selectedPositions.size > 1) { activity.shareMedia(getSelectedMedia()) } }