mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
move folder distinction check further
This commit is contained in:
@ -66,7 +66,8 @@ class MediaFetcher(val context: Context) {
|
||||
val shouldShowHidden = config.shouldShowHidden
|
||||
val excludedPaths = config.excludedFolders
|
||||
val includedPaths = config.includedFolders
|
||||
folders.filter { it.shouldFolderBeVisible(excludedPaths, includedPaths, shouldShowHidden, context) }.toMutableList() as ArrayList<String>
|
||||
folders.distinctBy { it.getDistinctPath() }
|
||||
.filter { it.shouldFolderBeVisible(excludedPaths, includedPaths, shouldShowHidden, context) }.toMutableList() as ArrayList<String>
|
||||
} catch (e: Exception) {
|
||||
ArrayList()
|
||||
}
|
||||
@ -190,7 +191,7 @@ class MediaFetcher(val context: Context) {
|
||||
addFolder(foldersToScan, it)
|
||||
}
|
||||
|
||||
return foldersToScan.distinctBy { it.getDistinctPath() }.toMutableSet() as LinkedHashSet<String>
|
||||
return foldersToScan.toMutableSet() as LinkedHashSet<String>
|
||||
}
|
||||
|
||||
private fun addFolder(curFolders: HashSet<String>, folder: String) {
|
||||
|
Reference in New Issue
Block a user