From e2fe74ea335b4b8b53d46fe24bd24e240d642b46 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 24 Apr 2018 10:12:49 +0200 Subject: [PATCH] flip getImage and getVideo arguments at getMedia async task --- .../com/simplemobiletools/gallery/activities/MediaActivity.kt | 2 +- .../simplemobiletools/gallery/asynctasks/GetMediaAsynctask.kt | 2 +- .../com/simplemobiletools/gallery/dialogs/PickMediumDialog.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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 4b91853fa..c5357e42f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt @@ -474,7 +474,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { mLoadedInitialPhotos = true mCurrAsyncTask?.stopFetching() - mCurrAsyncTask = GetMediaAsynctask(applicationContext, mPath, mIsGetVideoIntent, mIsGetImageIntent, mShowAll) { + mCurrAsyncTask = GetMediaAsynctask(applicationContext, mPath, mIsGetImageIntent, mIsGetVideoIntent, mShowAll) { gotMedia(it) } mCurrAsyncTask!!.execute() diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetMediaAsynctask.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetMediaAsynctask.kt index d59ee1850..8f82b4c00 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetMediaAsynctask.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetMediaAsynctask.kt @@ -7,7 +7,7 @@ import com.simplemobiletools.gallery.helpers.MediaFetcher import com.simplemobiletools.gallery.models.Medium import java.util.* -class GetMediaAsynctask(val context: Context, val mPath: String, val isPickVideo: Boolean = false, val isPickImage: Boolean = false, +class GetMediaAsynctask(val context: Context, val mPath: String, val isPickImage: Boolean = false, val isPickVideo: Boolean = false, val showAll: Boolean, val callback: (media: ArrayList) -> Unit) : AsyncTask>() { private val mediaFetcher = MediaFetcher(context) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/PickMediumDialog.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/PickMediumDialog.kt index 0daec8e55..a717c3cfa 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/PickMediumDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/PickMediumDialog.kt @@ -45,7 +45,7 @@ class PickMediumDialog(val activity: BaseSimpleActivity, val path: String, val c } } - GetMediaAsynctask(activity, path, false, true, false) { + GetMediaAsynctask(activity, path, true, false, false) { gotMedia(it) }.execute() }