flip getImage and getVideo arguments at getMedia async task
This commit is contained in:
parent
bd077cba8c
commit
e2fe74ea33
|
@ -474,7 +474,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
|
|
||||||
mLoadedInitialPhotos = true
|
mLoadedInitialPhotos = true
|
||||||
mCurrAsyncTask?.stopFetching()
|
mCurrAsyncTask?.stopFetching()
|
||||||
mCurrAsyncTask = GetMediaAsynctask(applicationContext, mPath, mIsGetVideoIntent, mIsGetImageIntent, mShowAll) {
|
mCurrAsyncTask = GetMediaAsynctask(applicationContext, mPath, mIsGetImageIntent, mIsGetVideoIntent, mShowAll) {
|
||||||
gotMedia(it)
|
gotMedia(it)
|
||||||
}
|
}
|
||||||
mCurrAsyncTask!!.execute()
|
mCurrAsyncTask!!.execute()
|
||||||
|
|
|
@ -7,7 +7,7 @@ import com.simplemobiletools.gallery.helpers.MediaFetcher
|
||||||
import com.simplemobiletools.gallery.models.Medium
|
import com.simplemobiletools.gallery.models.Medium
|
||||||
import java.util.*
|
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<Medium>) -> Unit) :
|
val showAll: Boolean, val callback: (media: ArrayList<Medium>) -> Unit) :
|
||||||
AsyncTask<Void, Void, ArrayList<Medium>>() {
|
AsyncTask<Void, Void, ArrayList<Medium>>() {
|
||||||
private val mediaFetcher = MediaFetcher(context)
|
private val mediaFetcher = MediaFetcher(context)
|
||||||
|
|
|
@ -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)
|
gotMedia(it)
|
||||||
}.execute()
|
}.execute()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue