avoid fetching locked folder items at Show All Folders Content
This commit is contained in:
parent
9aea2eec63
commit
734db5f242
2 changed files with 2 additions and 2 deletions
|
@ -23,7 +23,7 @@ class GetMediaAsynctask(val context: Context, val mPath: String, val isPickImage
|
||||||
val favoritePaths = context.getFavoritePaths()
|
val favoritePaths = context.getFavoritePaths()
|
||||||
val getVideoDurations = context.config.showThumbnailVideoDuration
|
val getVideoDurations = context.config.showThumbnailVideoDuration
|
||||||
val media = if (showAll) {
|
val media = if (showAll) {
|
||||||
val foldersToScan = mediaFetcher.getFoldersToScan().filter { it != RECYCLE_BIN && it != FAVORITES }
|
val foldersToScan = mediaFetcher.getFoldersToScan().filter { it != RECYCLE_BIN && it != FAVORITES && !context.config.isFolderProtected(it) }
|
||||||
val media = ArrayList<Medium>()
|
val media = ArrayList<Medium>()
|
||||||
foldersToScan.forEach {
|
foldersToScan.forEach {
|
||||||
val newMedia = mediaFetcher.getFilesFrom(it, isPickImage, isPickVideo, getProperDateTaken, getProperFileSize, favoritePaths, getVideoDurations, false)
|
val newMedia = mediaFetcher.getFilesFrom(it, isPickImage, isPickVideo, getProperDateTaken, getProperFileSize, favoritePaths, getVideoDurations, false)
|
||||||
|
|
|
@ -616,7 +616,7 @@ fun Context.getCachedMedia(path: String, getVideosOnly: Boolean = false, getImag
|
||||||
}
|
}
|
||||||
|
|
||||||
val shouldShowHidden = config.shouldShowHidden
|
val shouldShowHidden = config.shouldShowHidden
|
||||||
foldersToScan.forEach {
|
foldersToScan.filter { path.isNotEmpty() || !config.isFolderProtected(it) }.forEach {
|
||||||
try {
|
try {
|
||||||
val currMedia = mediumDao.getMediaFromPath(it)
|
val currMedia = mediumDao.getMediaFromPath(it)
|
||||||
media.addAll(currMedia)
|
media.addAll(currMedia)
|
||||||
|
|
Loading…
Reference in a new issue