add only Portrait folders in subdirs at fetching media
This commit is contained in:
parent
77f3c3adb6
commit
49ad4d812f
1 changed files with 4 additions and 2 deletions
|
@ -207,7 +207,7 @@ class MediaFetcher(val context: Context) {
|
||||||
val checkFileExistence = config.fileLoadingPriority == PRIORITY_VALIDITY
|
val checkFileExistence = config.fileLoadingPriority == PRIORITY_VALIDITY
|
||||||
val showHidden = config.shouldShowHidden
|
val showHidden = config.shouldShowHidden
|
||||||
val dateTakens = if (getProperDateTaken && folder != FAVORITES && !isRecycleBin) getFolderDateTakens(folder) else HashMap()
|
val dateTakens = if (getProperDateTaken && folder != FAVORITES && !isRecycleBin) getFolderDateTakens(folder) else HashMap()
|
||||||
val subdirs = ArrayList<File>()
|
val subdirs = ArrayList<File>() // used only for Portrait photos starting with "IMG_" for now
|
||||||
|
|
||||||
val files = when (folder) {
|
val files = when (folder) {
|
||||||
FAVORITES -> favoritePaths.filter { showHidden || !it.contains("/.") }.map { File(it) }.toMutableList() as ArrayList<File>
|
FAVORITES -> favoritePaths.filter { showHidden || !it.contains("/.") }.map { File(it) }.toMutableList() as ArrayList<File>
|
||||||
|
@ -217,7 +217,9 @@ class MediaFetcher(val context: Context) {
|
||||||
val notDirs = ArrayList<File>()
|
val notDirs = ArrayList<File>()
|
||||||
allFiles.forEach {
|
allFiles.forEach {
|
||||||
if (it.isDirectory) {
|
if (it.isDirectory) {
|
||||||
|
if (it.name.startsWith("img_", true)) {
|
||||||
subdirs.add(it)
|
subdirs.add(it)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
notDirs.add(it)
|
notDirs.add(it)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue