avoid duplicate folder initialization at app startup
This commit is contained in:
parent
2532c43f7e
commit
4d5a4098b4
|
@ -42,6 +42,7 @@ class MainActivity : SimpleActivity(), ItemsFragment.ItemInteractionListener, Br
|
|||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_main)
|
||||
storeConfigVariables()
|
||||
breadcrumbs.setListener(this)
|
||||
tryInitFileManager()
|
||||
storeStoragePaths()
|
||||
|
@ -62,7 +63,7 @@ class MainActivity : SimpleActivity(), ItemsFragment.ItemInteractionListener, Br
|
|||
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
storedTextColor = config.textColor
|
||||
storeConfigVariables()
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
|
@ -70,6 +71,10 @@ class MainActivity : SimpleActivity(), ItemsFragment.ItemInteractionListener, Br
|
|||
config.temporarilyShowHidden = false
|
||||
}
|
||||
|
||||
private fun storeConfigVariables() {
|
||||
storedTextColor = config.textColor
|
||||
}
|
||||
|
||||
private fun tryInitFileManager() {
|
||||
if (hasWriteStoragePermission()) {
|
||||
initRootFileManager()
|
||||
|
|
Loading…
Reference in New Issue