mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
do not exclude the Data folder by default
there is another way of attempting to remove spam folders already
This commit is contained in:
parent
0cad141a5b
commit
22e22dd0fb
1 changed files with 1 additions and 9 deletions
|
@ -117,17 +117,9 @@ class Config(context: Context) : BaseConfig(context) {
|
|||
}
|
||||
|
||||
var excludedFolders: MutableSet<String>
|
||||
get() = prefs.getStringSet(EXCLUDED_FOLDERS, getDataFolder())
|
||||
get() = prefs.getStringSet(EXCLUDED_FOLDERS, HashSet<String>())
|
||||
set(excludedFolders) = prefs.edit().remove(EXCLUDED_FOLDERS).putStringSet(EXCLUDED_FOLDERS, excludedFolders).apply()
|
||||
|
||||
private fun getDataFolder(): Set<String> {
|
||||
val folders = HashSet<String>()
|
||||
val dataFolder = context.externalCacheDir?.parentFile?.parent?.trimEnd('/') ?: ""
|
||||
if (dataFolder.endsWith("data"))
|
||||
folders.add(dataFolder)
|
||||
return folders
|
||||
}
|
||||
|
||||
fun addIncludedFolder(path: String) {
|
||||
val currIncludedFolders = HashSet<String>(includedFolders)
|
||||
currIncludedFolders.add(path)
|
||||
|
|
Loading…
Reference in a new issue