properly open manually included folders

This commit is contained in:
Tibor Kaputa 2017-06-07 16:07:01 +02:00
parent b4657ff16c
commit e15d6d8507

View file

@ -139,8 +139,7 @@ private fun parseCursor(context: Context, cur: Cursor, isPickImage: Boolean, isP
} }
} }
if (curPath.isEmpty()) { config.includedFolders.filter { it.isEmpty() || it == curPath }.mapNotNull { File(it).listFiles() }.forEach {
config.includedFolders.mapNotNull { File(it).listFiles() }.forEach {
for (file in it) { for (file in it) {
val size = file.length() val size = file.length()
if (size <= 0L) { if (size <= 0L) {
@ -169,7 +168,6 @@ private fun parseCursor(context: Context, cur: Cursor, isPickImage: Boolean, isP
curMedia.add(medium) curMedia.add(medium)
} }
} }
}
Medium.sorting = config.getFileSorting(curPath) Medium.sorting = config.getFileSorting(curPath)
curMedia.sort() curMedia.sort()