mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-30 00:17:58 +01:00
fix #901, make sure "Temporarily show hidden" persists through device rotation
This commit is contained in:
parent
0ced7023f1
commit
bd084a09b4
2 changed files with 11 additions and 8 deletions
|
@ -85,8 +85,12 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
|||
mMediumDao = galleryDB.MediumDao()
|
||||
mDirectoryDao = galleryDB.DirectoryDao()
|
||||
|
||||
config.temporarilyShowHidden = false
|
||||
config.tempSkipDeleteConfirmation = false
|
||||
if (savedInstanceState == null) {
|
||||
config.temporarilyShowHidden = false
|
||||
config.tempSkipDeleteConfirmation = false
|
||||
removeTempFolder()
|
||||
}
|
||||
|
||||
mIsPickImageIntent = isPickImageIntent(intent)
|
||||
mIsPickVideoIntent = isPickVideoIntent(intent)
|
||||
mIsGetImageContentIntent = isGetImageContentIntent(intent)
|
||||
|
@ -97,7 +101,6 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
|||
mIsThirdPartyIntent = mIsPickImageIntent || mIsPickVideoIntent || mIsGetImageContentIntent || mIsGetVideoContentIntent ||
|
||||
mIsGetAnyContentIntent || mIsSetWallpaperIntent
|
||||
|
||||
removeTempFolder()
|
||||
directories_refresh_layout.setOnRefreshListener { getDirectories() }
|
||||
storeStateVariables()
|
||||
checkWhatsNewDialog()
|
||||
|
@ -216,11 +219,11 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
|||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
config.temporarilyShowHidden = false
|
||||
config.tempSkipDeleteConfirmation = false
|
||||
mTempShowHiddenHandler.removeCallbacksAndMessages(null)
|
||||
removeTempFolder()
|
||||
if (!isChangingConfigurations) {
|
||||
config.temporarilyShowHidden = false
|
||||
config.tempSkipDeleteConfirmation = false
|
||||
mTempShowHiddenHandler.removeCallbacksAndMessages(null)
|
||||
removeTempFolder()
|
||||
GalleryDatabase.destroyInstance()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -188,7 +188,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
|||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
if (config.showAll) {
|
||||
if (config.showAll && !isChangingConfigurations) {
|
||||
config.temporarilyShowHidden = false
|
||||
config.tempSkipDeleteConfirmation = false
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue