try removing temp folder at app start too, if available
This commit is contained in:
parent
54a4d29233
commit
51b4d9981f
1 changed files with 4 additions and 1 deletions
|
@ -73,7 +73,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
mIsThirdPartyIntent = mIsPickImageIntent || mIsPickVideoIntent || mIsGetImageContentIntent || mIsGetVideoContentIntent ||
|
||||
mIsGetAnyContentIntent || mIsSetWallpaperIntent
|
||||
|
||||
config.tempFolderPath = ""
|
||||
removeTempFolder()
|
||||
directories_refresh_layout.setOnRefreshListener({ getDirectories() })
|
||||
mDirs = ArrayList()
|
||||
mStoredAnimateGifs = config.animateGifs
|
||||
|
@ -159,7 +159,10 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
|||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
config.temporarilyShowHidden = false
|
||||
removeTempFolder()
|
||||
}
|
||||
|
||||
private fun removeTempFolder() {
|
||||
val newFolder = File(config.tempFolderPath)
|
||||
if (newFolder.exists() && newFolder.isDirectory) {
|
||||
if (newFolder.list()?.isEmpty() == true) {
|
||||
|
|
Loading…
Reference in a new issue