start the media fetching asynctask only after cached files have been loaded

This commit is contained in:
tibbi 2018-07-01 20:51:17 +02:00
parent 3a1c3b6cf9
commit 2f152da15a
1 changed files with 5 additions and 0 deletions

View File

@ -543,12 +543,17 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
} else {
gotMedia(it, true)
}
startAsyncTask()
}
} else {
media_refresh_layout.isRefreshing = true
startAsyncTask()
}
mLoadedInitialPhotos = true
}
private fun startAsyncTask() {
mCurrAsyncTask?.stopFetching()
mCurrAsyncTask = GetMediaAsynctask(applicationContext, mPath, mIsGetImageIntent, mIsGetVideoIntent, mShowAll) {
Thread {