diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt index f7816899d..847db89c2 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt @@ -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 {