destroy the Gallery database instance only if the user exits the app
This commit is contained in:
parent
688b0e2624
commit
9aade59c07
1 changed files with 3 additions and 1 deletions
|
@ -190,7 +190,9 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
config.temporarilyShowHidden = false
|
config.temporarilyShowHidden = false
|
||||||
mTempShowHiddenHandler.removeCallbacksAndMessages(null)
|
mTempShowHiddenHandler.removeCallbacksAndMessages(null)
|
||||||
removeTempFolder()
|
removeTempFolder()
|
||||||
GalleryDataBase.destroyInstance()
|
if (!isChangingConfigurations) {
|
||||||
|
GalleryDataBase.destroyInstance()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||||
|
|
Loading…
Reference in a new issue