destroy the Gallery database instance only if the user exits the app

This commit is contained in:
tibbi 2018-04-26 09:41:15 +02:00
parent 688b0e2624
commit 9aade59c07

View file

@ -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 {