fix #901, make sure "Temporarily show hidden" persists through device rotation
This commit is contained in:
parent
0ced7023f1
commit
bd084a09b4
|
@ -85,8 +85,12 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
||||||
mMediumDao = galleryDB.MediumDao()
|
mMediumDao = galleryDB.MediumDao()
|
||||||
mDirectoryDao = galleryDB.DirectoryDao()
|
mDirectoryDao = galleryDB.DirectoryDao()
|
||||||
|
|
||||||
config.temporarilyShowHidden = false
|
if (savedInstanceState == null) {
|
||||||
config.tempSkipDeleteConfirmation = false
|
config.temporarilyShowHidden = false
|
||||||
|
config.tempSkipDeleteConfirmation = false
|
||||||
|
removeTempFolder()
|
||||||
|
}
|
||||||
|
|
||||||
mIsPickImageIntent = isPickImageIntent(intent)
|
mIsPickImageIntent = isPickImageIntent(intent)
|
||||||
mIsPickVideoIntent = isPickVideoIntent(intent)
|
mIsPickVideoIntent = isPickVideoIntent(intent)
|
||||||
mIsGetImageContentIntent = isGetImageContentIntent(intent)
|
mIsGetImageContentIntent = isGetImageContentIntent(intent)
|
||||||
|
@ -97,7 +101,6 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
||||||
mIsThirdPartyIntent = mIsPickImageIntent || mIsPickVideoIntent || mIsGetImageContentIntent || mIsGetVideoContentIntent ||
|
mIsThirdPartyIntent = mIsPickImageIntent || mIsPickVideoIntent || mIsGetImageContentIntent || mIsGetVideoContentIntent ||
|
||||||
mIsGetAnyContentIntent || mIsSetWallpaperIntent
|
mIsGetAnyContentIntent || mIsSetWallpaperIntent
|
||||||
|
|
||||||
removeTempFolder()
|
|
||||||
directories_refresh_layout.setOnRefreshListener { getDirectories() }
|
directories_refresh_layout.setOnRefreshListener { getDirectories() }
|
||||||
storeStateVariables()
|
storeStateVariables()
|
||||||
checkWhatsNewDialog()
|
checkWhatsNewDialog()
|
||||||
|
@ -216,11 +219,11 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
config.temporarilyShowHidden = false
|
|
||||||
config.tempSkipDeleteConfirmation = false
|
|
||||||
mTempShowHiddenHandler.removeCallbacksAndMessages(null)
|
|
||||||
removeTempFolder()
|
|
||||||
if (!isChangingConfigurations) {
|
if (!isChangingConfigurations) {
|
||||||
|
config.temporarilyShowHidden = false
|
||||||
|
config.tempSkipDeleteConfirmation = false
|
||||||
|
mTempShowHiddenHandler.removeCallbacksAndMessages(null)
|
||||||
|
removeTempFolder()
|
||||||
GalleryDatabase.destroyInstance()
|
GalleryDatabase.destroyInstance()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -188,7 +188,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
if (config.showAll) {
|
if (config.showAll && !isChangingConfigurations) {
|
||||||
config.temporarilyShowHidden = false
|
config.temporarilyShowHidden = false
|
||||||
config.tempSkipDeleteConfirmation = false
|
config.tempSkipDeleteConfirmation = false
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue