From 1397c2d48b241e742757d97f959e03f9286be59c Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 5 Sep 2017 15:39:11 +0200 Subject: [PATCH] update the way we are selecting media at share --- .../com/simplemobiletools/gallery/adapters/MediaAdapter.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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()) } }