mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 04:57:59 +01:00
fix #470, avoid running 2 directory fetching async tasks at once
This commit is contained in:
parent
015fde6a97
commit
2c2f0ea5f6
1 changed files with 2 additions and 0 deletions
|
@ -247,7 +247,9 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
mLoadedInitialPhotos = true
|
mLoadedInitialPhotos = true
|
||||||
|
mCurrAsyncTask?.stopFetching()
|
||||||
mCurrAsyncTask = GetDirectoriesAsynctask(applicationContext, mIsPickVideoIntent || mIsGetVideoContentIntent, mIsPickImageIntent || mIsGetImageContentIntent) {
|
mCurrAsyncTask = GetDirectoriesAsynctask(applicationContext, mIsPickVideoIntent || mIsGetVideoContentIntent, mIsPickImageIntent || mIsGetImageContentIntent) {
|
||||||
|
mCurrAsyncTask = null
|
||||||
gotDirectories(addTempFolderIfNeeded(it), false)
|
gotDirectories(addTempFolderIfNeeded(it), false)
|
||||||
}
|
}
|
||||||
mCurrAsyncTask!!.execute()
|
mCurrAsyncTask!!.execute()
|
||||||
|
|
Loading…
Reference in a new issue