update the way we are selecting media at share

This commit is contained in:
tibbi 2017-09-05 15:39:11 +02:00
parent a663b89665
commit 1397c2d48b

View file

@ -162,9 +162,9 @@ class MediaAdapter(val activity: SimpleActivity, var media: MutableList<Medium>,
} }
private fun shareMedia() { private fun shareMedia() {
if (selectedPositions.size <= 1) { if (selectedPositions.size == 1 && selectedPositions.first() != -1) {
activity.shareMedium(getSelectedMedia()[0]) activity.shareMedium(getSelectedMedia()[0])
} else { } else if (selectedPositions.size > 1) {
activity.shareMedia(getSelectedMedia()) activity.shareMedia(getSelectedMedia())
} }
} }