stop fetching directories in onDestroy

This commit is contained in:
tibbi 2018-03-24 10:01:06 +01:00
parent 8aa7c774da
commit b1ac75e3d5
1 changed files with 4 additions and 1 deletions

View File

@ -15,7 +15,6 @@ import android.view.ViewGroup
import android.widget.FrameLayout import android.widget.FrameLayout
import com.simplemobiletools.commons.dialogs.CreateNewFolderDialog import com.simplemobiletools.commons.dialogs.CreateNewFolderDialog
import com.simplemobiletools.commons.dialogs.FilePickerDialog import com.simplemobiletools.commons.dialogs.FilePickerDialog
import com.simplemobiletools.commons.dialogs.NewAppDialog
import com.simplemobiletools.commons.dialogs.RadioGroupDialog import com.simplemobiletools.commons.dialogs.RadioGroupDialog
import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.PERMISSION_READ_STORAGE import com.simplemobiletools.commons.helpers.PERMISSION_READ_STORAGE
@ -188,6 +187,10 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
config.temporarilyShowHidden = false config.temporarilyShowHidden = false
mTempShowHiddenHandler.removeCallbacksAndMessages(null) mTempShowHiddenHandler.removeCallbacksAndMessages(null)
removeTempFolder() removeTempFolder()
if (!mDirs.isEmpty()) {
mCurrAsyncTask?.stopFetching()
}
} }
override fun onCreateOptionsMenu(menu: Menu): Boolean { override fun onCreateOptionsMenu(menu: Menu): Boolean {