improve the checks if the file is a gif
This commit is contained in:
parent
fe09961c61
commit
416f459bc5
1 changed files with 2 additions and 2 deletions
|
@ -96,7 +96,7 @@ private fun parseCursor(context: Context, cur: Cursor, isPickImage: Boolean, isP
|
||||||
|
|
||||||
val isImage = filename.isImageFast()
|
val isImage = filename.isImageFast()
|
||||||
val isVideo = if (isImage) false else filename.isVideoFast()
|
val isVideo = if (isImage) false else filename.isVideoFast()
|
||||||
val isGif = filename.isGif()
|
val isGif = if (isImage || isVideo) false else filename.isGif()
|
||||||
|
|
||||||
if (!isImage && !isVideo && !isGif)
|
if (!isImage && !isVideo && !isGif)
|
||||||
continue
|
continue
|
||||||
|
@ -161,7 +161,7 @@ private fun parseCursor(context: Context, cur: Cursor, isPickImage: Boolean, isP
|
||||||
val filename = file.name
|
val filename = file.name
|
||||||
val isImage = filename.isImageFast()
|
val isImage = filename.isImageFast()
|
||||||
val isVideo = if (isImage) false else filename.isVideoFast()
|
val isVideo = if (isImage) false else filename.isVideoFast()
|
||||||
val isGif = filename.isGif()
|
val isGif = if (isImage || isVideo) false else filename.isGif()
|
||||||
|
|
||||||
if (!isImage && !isVideo)
|
if (!isImage && !isVideo)
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in a new issue