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 1ca189290..cadad1cfc 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt @@ -15,7 +15,6 @@ import android.view.ViewGroup import android.widget.FrameLayout import com.simplemobiletools.commons.dialogs.CreateNewFolderDialog import com.simplemobiletools.commons.dialogs.FilePickerDialog -import com.simplemobiletools.commons.dialogs.NewAppDialog import com.simplemobiletools.commons.dialogs.RadioGroupDialog import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.helpers.PERMISSION_READ_STORAGE @@ -188,6 +187,10 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { config.temporarilyShowHidden = false mTempShowHiddenHandler.removeCallbacksAndMessages(null) removeTempFolder() + + if (!mDirs.isEmpty()) { + mCurrAsyncTask?.stopFetching() + } } override fun onCreateOptionsMenu(menu: Menu): Boolean {