mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
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 ||
|
mIsThirdPartyIntent = mIsPickImageIntent || mIsPickVideoIntent || mIsGetImageContentIntent || mIsGetVideoContentIntent ||
|
||||||
mIsGetAnyContentIntent || mIsSetWallpaperIntent
|
mIsGetAnyContentIntent || mIsSetWallpaperIntent
|
||||||
|
|
||||||
config.tempFolderPath = ""
|
removeTempFolder()
|
||||||
directories_refresh_layout.setOnRefreshListener({ getDirectories() })
|
directories_refresh_layout.setOnRefreshListener({ getDirectories() })
|
||||||
mDirs = ArrayList()
|
mDirs = ArrayList()
|
||||||
mStoredAnimateGifs = config.animateGifs
|
mStoredAnimateGifs = config.animateGifs
|
||||||
|
@ -159,7 +159,10 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
config.temporarilyShowHidden = false
|
config.temporarilyShowHidden = false
|
||||||
|
removeTempFolder()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun removeTempFolder() {
|
||||||
val newFolder = File(config.tempFolderPath)
|
val newFolder = File(config.tempFolderPath)
|
||||||
if (newFolder.exists() && newFolder.isDirectory) {
|
if (newFolder.exists() && newFolder.isDirectory) {
|
||||||
if (newFolder.list()?.isEmpty() == true) {
|
if (newFolder.list()?.isEmpty() == true) {
|
||||||
|
|
Loading…
Reference in a new issue