add an extra check for handling only direct subfolders
This commit is contained in:
parent
619e7ee3f4
commit
a96e3201a3
1 changed files with 6 additions and 3 deletions
|
@ -1006,7 +1006,9 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
|||
}
|
||||
}
|
||||
|
||||
// make sure we count only the proper direct subfolders, grouped the same way as on the main screen
|
||||
parentDirs.firstOrNull { it.path == longestSharedPath }?.apply {
|
||||
if (path.equals(child.path, true) || path.equals(File(child.path).parent, true) || children.any { it.path.equals(File(child.path).parent, true) }) {
|
||||
subfoldersCount++
|
||||
if (path != child.path) {
|
||||
subfoldersMediaCount += child.mediaCnt
|
||||
|
@ -1014,6 +1016,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun createDirectoryFromMedia(path: String, curMedia: ArrayList<Medium>, albumCovers: ArrayList<AlbumCover>, hiddenString: String,
|
||||
includedFolders: MutableSet<String>, isSortingAscending: Boolean): Directory {
|
||||
|
|
Loading…
Reference in a new issue