prefill nomedia folders after fetching

This commit is contained in:
tibbi 2021-01-18 12:29:52 +01:00
parent e59c061972
commit 876e10a202

View file

@ -553,8 +553,12 @@ fun Context.getCachedDirectories(getVideosOnly: Boolean = false, getImagesOnly:
val excludedPaths = config.excludedFolders
val includedPaths = config.includedFolders
val noMediaFolders = getNoMediaFoldersSync()
val folderNoMediaStatuses = HashMap<String, Boolean>()
val noMediaFolders = getNoMediaFoldersSync()
noMediaFolders.forEach { folder ->
folderNoMediaStatuses[folder] = true
}
var filteredDirectories = directories.filter {
it.path.shouldFolderBeVisible(excludedPaths, includedPaths, shouldShowHidden, folderNoMediaStatuses, noMediaFolders) { path, hasNoMedia ->
folderNoMediaStatuses[path] = hasNoMedia