if a file is an image, do not check if its a video

This commit is contained in:
tibbi 2017-02-19 19:25:22 +01:00
parent 97f0345655
commit 5d04e1967f

View file

@ -50,7 +50,7 @@ class GetMediaAsynctask(val context: Context, val mPath: String, val isPickVideo
val files = dir.listFiles() ?: return media val files = dir.listFiles() ?: return media
for (file in files) { for (file in files) {
val isImage = file.isImageFast() || file.isGif() val isImage = file.isImageFast() || file.isGif()
val isVideo = file.isVideoFast() val isVideo = if (isImage) false else file.isVideoFast()
if (!isImage && !isVideo) if (!isImage && !isVideo)
continue continue