mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-30 00:17:58 +01:00
flip getImage and getVideo arguments at getMedia async task
This commit is contained in:
parent
bd077cba8c
commit
e2fe74ea33
3 changed files with 3 additions and 3 deletions
|
@ -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()
|
||||
|
|
|
@ -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<Medium>) -> Unit) :
|
||||
AsyncTask<Void, Void, ArrayList<Medium>>() {
|
||||
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)
|
||||
}.execute()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue