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
|
||||
mTempShowHiddenHandler.removeCallbacksAndMessages(null)
|
||||
removeTempFolder()
|
||||
GalleryDataBase.destroyInstance()
|
||||
if (!isChangingConfigurations) {
|
||||
GalleryDataBase.destroyInstance()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||
|
|
Loading…
Reference in a new issue