mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 04:57:59 +01:00
show portrait folders in some cases
This commit is contained in:
parent
7db3b82ae0
commit
3bdca11698
2 changed files with 6 additions and 3 deletions
|
@ -62,7 +62,7 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.simplemobiletools:commons:5.17.19'
|
||||
implementation 'com.simplemobiletools:commons:5.18.0'
|
||||
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
|
||||
implementation 'androidx.multidex:multidex:2.0.1'
|
||||
implementation 'it.sephiroth.android.exif:library:1.0.1'
|
||||
|
|
|
@ -1119,8 +1119,11 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
|||
if (!File(it.path).exists()) {
|
||||
invalidDirs.add(it)
|
||||
} else if (it.path != config.tempFolderPath) {
|
||||
val children = File(it.path).list()?.asList()
|
||||
val hasMediaFile = children?.any { it?.isMediaFile() == true } ?: false
|
||||
val children = File(it.path).listFiles()?.asList()
|
||||
val hasMediaFile = children?.any {
|
||||
it?.isMediaFile() == true || (it.isDirectory && it.name.startsWith("img_", true))
|
||||
} ?: false
|
||||
|
||||
if (!hasMediaFile) {
|
||||
invalidDirs.add(it)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue