mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2024-12-29 01:31:15 +01:00
if a filename is empty, try getting it from the path
This commit is contained in:
parent
cc814d8d45
commit
987f333c5c
@ -78,6 +78,9 @@ class GetMediaAsynctask(val context: Context, val mPath: String, val isPickVideo
|
||||
}
|
||||
|
||||
filename = cur.getStringValue(MediaStore.Images.Media.DISPLAY_NAME) ?: ""
|
||||
if (filename.isEmpty())
|
||||
filename = path.getFilenameFromPath()
|
||||
|
||||
val isImage = filename.isImageFast() || filename.isGif()
|
||||
val isVideo = if (isImage) false else filename.isVideoFast()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user