mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 14:37:59 +01:00
optimize folder fetching a bit
This commit is contained in:
parent
60b6af17f8
commit
1daa85e629
1 changed files with 2 additions and 2 deletions
|
@ -125,9 +125,9 @@ class MediaFetcher(val context: Context) {
|
|||
cursor.use {
|
||||
if (cursor.moveToFirst()) {
|
||||
do {
|
||||
val path = cursor.getStringValue(MediaStore.Images.Media.DATA).trim()
|
||||
val path = cursor.getStringValue(MediaStore.Images.Media.DATA)
|
||||
val parentPath = File(path).parent?.trimEnd('/') ?: continue
|
||||
if (!includedFolders.contains(parentPath) && !foldersToIgnore.contains(parentPath.toLowerCase())) {
|
||||
if (!includedFolders.contains(parentPath) && !foldersToIgnore.contains(parentPath)) {
|
||||
foldersToScan.add(parentPath)
|
||||
}
|
||||
} while (cursor.moveToNext())
|
||||
|
|
Loading…
Reference in a new issue