mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-06-02 04:09:38 +02:00
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?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_main)
|
setContentView(R.layout.activity_main)
|
||||||
|
storeConfigVariables()
|
||||||
breadcrumbs.setListener(this)
|
breadcrumbs.setListener(this)
|
||||||
tryInitFileManager()
|
tryInitFileManager()
|
||||||
storeStoragePaths()
|
storeStoragePaths()
|
||||||
@ -62,7 +63,7 @@ class MainActivity : SimpleActivity(), ItemsFragment.ItemInteractionListener, Br
|
|||||||
|
|
||||||
override fun onPause() {
|
override fun onPause() {
|
||||||
super.onPause()
|
super.onPause()
|
||||||
storedTextColor = config.textColor
|
storeConfigVariables()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
@ -70,6 +71,10 @@ class MainActivity : SimpleActivity(), ItemsFragment.ItemInteractionListener, Br
|
|||||||
config.temporarilyShowHidden = false
|
config.temporarilyShowHidden = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun storeConfigVariables() {
|
||||||
|
storedTextColor = config.textColor
|
||||||
|
}
|
||||||
|
|
||||||
private fun tryInitFileManager() {
|
private fun tryInitFileManager() {
|
||||||
if (hasWriteStoragePermission()) {
|
if (hasWriteStoragePermission()) {
|
||||||
initRootFileManager()
|
initRootFileManager()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user