From 4617be2238f2bba154c4141490ca91578213aae9 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 22 Jun 2018 13:19:12 +0200 Subject: [PATCH] fix clicked medium type casting --- .../com/simplemobiletools/gallery/activities/MediaActivity.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt index 5bdcc90ed..c2afe97bc 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt @@ -40,6 +40,7 @@ import com.simplemobiletools.gallery.dialogs.FilterMediaDialog import com.simplemobiletools.gallery.extensions.* import com.simplemobiletools.gallery.helpers.* import com.simplemobiletools.gallery.models.Medium +import com.simplemobiletools.gallery.models.ThumbnailMedium import kotlinx.android.synthetic.main.activity_media.* import java.io.File import java.io.IOException @@ -320,7 +321,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { initZoomListener() val fastscroller = if (config.scrollHorizontally) media_horizontal_fastscroller else media_vertical_fastscroller MediaAdapter(this, media, this, mIsGetImageIntent || mIsGetVideoIntent || mIsGetAnyIntent, mAllowPickingMultiple, media_grid, fastscroller, mPath) { - itemClicked((it as Medium).path) + itemClicked((it as ThumbnailMedium).path) }.apply { setupZoomListener(mZoomListener) media_grid.adapter = this