mirror of
				https://github.com/SimpleMobileTools/Simple-Gallery.git
				synced 2025-06-05 21:59:19 +02:00 
			
		
		
		
	hide the subfolders of excluded folders too
This commit is contained in:
		| @@ -106,10 +106,12 @@ class GetDirectoriesAsynctask(val context: Context, val isPickVideo: Boolean, va | ||||
|  | ||||
|     private fun removeExcludedFolders(paths: MutableList<String>) { | ||||
|         val excludedPaths = config.excludedFolders | ||||
|         val ignorePaths = paths.filter { excludedPaths.contains(it) } | ||||
|         val ignorePaths = paths.filter { isThisOrParentExcluded(it, excludedPaths) } | ||||
|         paths.removeAll(ignorePaths) | ||||
|     } | ||||
|  | ||||
|     private fun isThisOrParentExcluded(path: String, excludedPaths: MutableSet<String>) = excludedPaths.any { path.startsWith(it) } | ||||
|  | ||||
|     private fun movePinnedToFront(dirs: ArrayList<Directory>): ArrayList<Directory> { | ||||
|         val foundFolders = ArrayList<Directory>() | ||||
|         val pinnedFolders = config.pinnedFolders | ||||
|   | ||||
		Reference in New Issue
	
	Block a user