small get directories style tweak
This commit is contained in:
parent
0efdb071cc
commit
926a45c72e
1 changed files with 12 additions and 15 deletions
|
@ -130,11 +130,11 @@ class GetDirectoriesAsynctask(val context: Context, val isPickVideo: Boolean, va
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun filterDirectories(dirs: MutableList<Directory>) {
|
private fun filterDirectories(dirs: MutableList<Directory>) {
|
||||||
if (!mConfig.showHiddenFolders)
|
if (!mConfig.showHiddenFolders) {
|
||||||
removeHiddenFolders(dirs)
|
removeHiddenFolders(dirs)
|
||||||
|
|
||||||
removeNoMediaFolders(dirs)
|
removeNoMediaFolders(dirs)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun removeHiddenFolders(dirs: MutableList<Directory>) {
|
private fun removeHiddenFolders(dirs: MutableList<Directory>) {
|
||||||
val hiddenDirs = mConfig.hiddenFolders
|
val hiddenDirs = mConfig.hiddenFolders
|
||||||
|
@ -143,8 +143,6 @@ class GetDirectoriesAsynctask(val context: Context, val isPickVideo: Boolean, va
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun removeNoMediaFolders(dirs: MutableList<Directory>) {
|
private fun removeNoMediaFolders(dirs: MutableList<Directory>) {
|
||||||
val showHiddenFolders = mConfig.showHiddenFolders
|
|
||||||
if (!showHiddenFolders) {
|
|
||||||
val ignoreDirs = ArrayList<Directory>()
|
val ignoreDirs = ArrayList<Directory>()
|
||||||
for (d in dirs) {
|
for (d in dirs) {
|
||||||
val dir = File(d.path)
|
val dir = File(d.path)
|
||||||
|
@ -158,4 +156,3 @@ class GetDirectoriesAsynctask(val context: Context, val isPickVideo: Boolean, va
|
||||||
dirs.removeAll(ignoreDirs)
|
dirs.removeAll(ignoreDirs)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue