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,9 +1028,12 @@ 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 (path != config.tempFolderPath) {
|
if (clickedDir.subfoldersCount == 1 || !config.groupDirectSubfolders) {
|
||||||
itemClicked(path)
|
val path = clickedDir.path
|
||||||
|
if (path != config.tempFolderPath) {
|
||||||
|
itemClicked(path)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}.apply {
|
}.apply {
|
||||||
setupZoomListener(mZoomListener)
|
setupZoomListener(mZoomListener)
|
||||||
|
|
Loading…
Reference in a new issue