fix #1153, do not show favorite items from hidden folders, when shouldnt

This commit is contained in:
tibbi 2018-12-26 20:12:55 +01:00
parent a608ce2d6e
commit 5abb3ae538

View file

@ -182,16 +182,16 @@ class MediaFetcher(val context: Context) {
ArrayList()
}
val files = when (folder) {
FAVORITES -> favoritePaths.map { File(it) }.toTypedArray()
RECYCLE_BIN -> deletedMedia.map { File(it.path) }.toTypedArray()
else -> File(folder).listFiles() ?: return media
}
val doExtraCheck = context.config.doExtraCheck
val showHidden = context.config.shouldShowHidden
val dateTakens = if (getProperDateTaken) getFolderDateTakens(folder) else HashMap()
val files = when (folder) {
FAVORITES -> favoritePaths.filter { showHidden || !it.contains("/.") }.map { File(it) }.toTypedArray()
RECYCLE_BIN -> deletedMedia.map { File(it.path) }.toTypedArray()
else -> File(folder).listFiles() ?: return media
}
for (file in files) {
if (shouldStop) {
break