check null folder children at DirectoryAdapter
This commit is contained in:
parent
6464c7eee4
commit
bab2b4e5a0
|
@ -47,7 +47,7 @@ ext {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.simplemobiletools:commons:3.19.12'
|
||||
implementation 'com.simplemobiletools:commons:3.19.14'
|
||||
implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0'
|
||||
implementation 'com.android.support:multidex:1.0.3'
|
||||
implementation 'it.sephiroth.android.exif:library:1.0.1'
|
||||
|
|
|
@ -280,7 +280,9 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList<Directo
|
|||
val paths = ArrayList<String>()
|
||||
selectedPositions.forEach {
|
||||
val dir = File(dirs[it].path)
|
||||
paths.addAll(dir.listFiles().filter { !activity.getIsPathDirectory(it.absolutePath) && it.absolutePath.isImageVideoGif() }.map { it.absolutePath })
|
||||
val childrenFiles = dir.listFiles()?.filter { !activity.getIsPathDirectory(it.absolutePath) && it.absolutePath.isImageVideoGif() }?.map { it.absolutePath }
|
||||
?: ArrayList<String>()
|
||||
paths.addAll(childrenFiles)
|
||||
}
|
||||
|
||||
val fileDirItems = paths.map { FileDirItem(it, it.getFilenameFromPath()) } as ArrayList<FileDirItem>
|
||||
|
|
|
@ -9,7 +9,7 @@ buildscript {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.1.1'
|
||||
classpath 'com.android.tools.build:gradle:3.1.2'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
|
|
Loading…
Reference in New Issue