start the media fetching asynctask only after cached files have been loaded
This commit is contained in:
parent
3a1c3b6cf9
commit
2f152da15a
|
@ -543,12 +543,17 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
} else {
|
} else {
|
||||||
gotMedia(it, true)
|
gotMedia(it, true)
|
||||||
}
|
}
|
||||||
|
startAsyncTask()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
media_refresh_layout.isRefreshing = true
|
media_refresh_layout.isRefreshing = true
|
||||||
|
startAsyncTask()
|
||||||
}
|
}
|
||||||
|
|
||||||
mLoadedInitialPhotos = true
|
mLoadedInitialPhotos = true
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun startAsyncTask() {
|
||||||
mCurrAsyncTask?.stopFetching()
|
mCurrAsyncTask?.stopFetching()
|
||||||
mCurrAsyncTask = GetMediaAsynctask(applicationContext, mPath, mIsGetImageIntent, mIsGetVideoIntent, mShowAll) {
|
mCurrAsyncTask = GetMediaAsynctask(applicationContext, mPath, mIsGetImageIntent, mIsGetVideoIntent, mShowAll) {
|
||||||
Thread {
|
Thread {
|
||||||
|
|
Loading…
Reference in New Issue