diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt index 2059b0cae..232e2835a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt @@ -247,7 +247,9 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { } mLoadedInitialPhotos = true + mCurrAsyncTask?.stopFetching() mCurrAsyncTask = GetDirectoriesAsynctask(applicationContext, mIsPickVideoIntent || mIsGetVideoContentIntent, mIsPickImageIntent || mIsGetImageContentIntent) { + mCurrAsyncTask = null gotDirectories(addTempFolderIfNeeded(it), false) } mCurrAsyncTask!!.execute()