mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-02-17 12:30:36 +01:00
add an extra check for handling only direct subfolders
This commit is contained in:
parent
619e7ee3f4
commit
a96e3201a3
@ -1006,10 +1006,13 @@ 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 {
|
||||
subfoldersCount++
|
||||
if (path != child.path) {
|
||||
subfoldersMediaCount += child.mediaCnt
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user