fix file filtering by type
This commit is contained in:
parent
af0a3ac7f6
commit
64085b4e04
2 changed files with 4 additions and 4 deletions
|
@ -47,7 +47,7 @@ ext {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.simplemobiletools:commons:4.2.2'
|
||||
implementation 'com.simplemobiletools:commons:4.2.4'
|
||||
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'
|
||||
|
|
|
@ -67,7 +67,7 @@ class MediaFetcher(val context: Context) {
|
|||
}
|
||||
|
||||
if (filterMedia and TYPE_GIFS != 0) {
|
||||
query.append("${MediaStore.Images.Media.DATA} LIKE ?")
|
||||
query.append("${MediaStore.Images.Media.DATA} LIKE ? OR ")
|
||||
}
|
||||
|
||||
if (filterMedia and TYPE_RAWS != 0) {
|
||||
|
@ -172,7 +172,7 @@ class MediaFetcher(val context: Context) {
|
|||
val isImage = filename.isImageFast()
|
||||
val isVideo = if (isImage) false else filename.isVideoFast()
|
||||
val isGif = if (isImage || isVideo) false else filename.isGif()
|
||||
val isRaw = if (isImage || isVideo || isGif) false else filename.isRaw()
|
||||
val isRaw = if (isImage || isVideo || isGif) false else filename.isRawFast()
|
||||
|
||||
if (!isImage && !isVideo && !isGif && !isRaw)
|
||||
continue
|
||||
|
@ -231,7 +231,7 @@ class MediaFetcher(val context: Context) {
|
|||
val isImage = filename.isImageFast()
|
||||
val isVideo = if (isImage) false else filename.isVideoFast()
|
||||
val isGif = if (isImage || isVideo) false else filename.isGif()
|
||||
val isRaw = if (isImage || isVideo || isGif) false else filename.isRaw()
|
||||
val isRaw = if (isImage || isVideo || isGif) false else filename.isRawFast()
|
||||
|
||||
if (!isImage && !isVideo && !isGif || !isRaw)
|
||||
continue
|
||||
|
|
Loading…
Reference in a new issue