mirror of
https://github.com/FossifyOrg/File-Manager.git
synced 2026-02-24 02:28:25 -05:00
avoid duplicate folder initialization at app startup
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user