open the clicked directory only if it contains no subfolders, or grouping is disabled
This commit is contained in:
parent
1e47a6dd2f
commit
5482059235
1 changed files with 6 additions and 3 deletions
|
@ -1028,10 +1028,13 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
||||||
initZoomListener()
|
initZoomListener()
|
||||||
val fastscroller = if (config.scrollHorizontally) directories_horizontal_fastscroller else directories_vertical_fastscroller
|
val fastscroller = if (config.scrollHorizontally) directories_horizontal_fastscroller else directories_vertical_fastscroller
|
||||||
DirectoryAdapter(this, dirsToShow, this, directories_grid, isPickIntent(intent) || isGetAnyContentIntent(intent), fastscroller) {
|
DirectoryAdapter(this, dirsToShow, this, directories_grid, isPickIntent(intent) || isGetAnyContentIntent(intent), fastscroller) {
|
||||||
val path = (it as Directory).path
|
val clickedDir = it as Directory
|
||||||
|
if (clickedDir.subfoldersCount == 1 || !config.groupDirectSubfolders) {
|
||||||
|
val path = clickedDir.path
|
||||||
if (path != config.tempFolderPath) {
|
if (path != config.tempFolderPath) {
|
||||||
itemClicked(path)
|
itemClicked(path)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}.apply {
|
}.apply {
|
||||||
setupZoomListener(mZoomListener)
|
setupZoomListener(mZoomListener)
|
||||||
directories_grid.adapter = this
|
directories_grid.adapter = this
|
||||||
|
|
Loading…
Reference in a new issue