open the home folder initially
This commit is contained in:
parent
41d67fe498
commit
c4c51c1faa
|
@ -26,7 +26,6 @@ import kotlinx.android.synthetic.main.activity_main.*
|
|||
import java.util.*
|
||||
|
||||
class MainActivity : SimpleActivity(), ItemsFragment.ItemInteractionListener, Breadcrumbs.BreadcrumbsListener {
|
||||
var mBasePath = getInternalStoragePath()
|
||||
var latestFragment: ItemsFragment? = null
|
||||
var mScrollStates = HashMap<String, Parcelable>()
|
||||
var mStoredTextColor = 0
|
||||
|
@ -53,7 +52,7 @@ class MainActivity : SimpleActivity(), ItemsFragment.ItemInteractionListener, Br
|
|||
if (mStoredTextColor != config.textColor) {
|
||||
mStoredTextColor = config.textColor
|
||||
breadcrumbs.setTextColor(mStoredTextColor)
|
||||
initRootFileManager()
|
||||
openPath(getCurrenPath())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -76,7 +75,7 @@ class MainActivity : SimpleActivity(), ItemsFragment.ItemInteractionListener, Br
|
|||
}
|
||||
|
||||
private fun initRootFileManager() {
|
||||
openPath(mBasePath)
|
||||
openPath(config.homeFolder)
|
||||
}
|
||||
|
||||
private fun openPath(path: String) {
|
||||
|
@ -165,8 +164,8 @@ class MainActivity : SimpleActivity(), ItemsFragment.ItemInteractionListener, Br
|
|||
|
||||
override fun breadcrumbClicked(id: Int) {
|
||||
if (id == 0) {
|
||||
StoragePickerDialog(this@MainActivity, mBasePath) {
|
||||
changePath(it)
|
||||
StoragePickerDialog(this@MainActivity, getCurrenPath()) {
|
||||
openPath(it)
|
||||
}
|
||||
} else {
|
||||
val item = breadcrumbs.getChildAt(id).tag as FileDirItem
|
||||
|
@ -174,11 +173,6 @@ class MainActivity : SimpleActivity(), ItemsFragment.ItemInteractionListener, Br
|
|||
}
|
||||
}
|
||||
|
||||
private fun changePath(pickedPath: String) {
|
||||
mBasePath = pickedPath
|
||||
openPath(pickedPath)
|
||||
}
|
||||
|
||||
private fun checkWhatsNewDialog() {
|
||||
arrayListOf<Release>().apply {
|
||||
add(Release(26, R.string.release_26))
|
||||
|
|
Loading…
Reference in New Issue