mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2025-01-31 12:16:44 +01:00
retrieve file name a bit later at fetching files
This commit is contained in:
parent
93907c54b4
commit
73698398a5
1 changed files with 7 additions and 7 deletions
|
@ -194,12 +194,12 @@ class MediaFetcher(val context: Context) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
val filename = file.name
|
val path = file.absolutePath
|
||||||
val isImage = filename.isImageFast()
|
val isImage = path.isImageFast()
|
||||||
val isVideo = if (isImage) false else filename.isVideoFast()
|
val isVideo = if (isImage) false else path.isVideoFast()
|
||||||
val isGif = if (isImage || isVideo) false else filename.isGif()
|
val isGif = if (isImage || isVideo) false else path.isGif()
|
||||||
val isRaw = if (isImage || isVideo || isGif) false else filename.isRawFast()
|
val isRaw = if (isImage || isVideo || isGif) false else path.isRawFast()
|
||||||
val isSvg = if (isImage || isVideo || isGif || isRaw) false else filename.isSvg()
|
val isSvg = if (isImage || isVideo || isGif || isRaw) false else path.isSvg()
|
||||||
|
|
||||||
if (!isImage && !isVideo && !isGif && !isRaw && !isSvg)
|
if (!isImage && !isVideo && !isGif && !isRaw && !isSvg)
|
||||||
continue
|
continue
|
||||||
|
@ -219,6 +219,7 @@ class MediaFetcher(val context: Context) {
|
||||||
if (isSvg && filterMedia and TYPE_SVGS == 0)
|
if (isSvg && filterMedia and TYPE_SVGS == 0)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
val filename = file.name
|
||||||
if (!showHidden && filename.startsWith('.'))
|
if (!showHidden && filename.startsWith('.'))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -226,7 +227,6 @@ class MediaFetcher(val context: Context) {
|
||||||
if (size <= 0L || (doExtraCheck && !file.exists()))
|
if (size <= 0L || (doExtraCheck && !file.exists()))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
val path = file.absolutePath
|
|
||||||
if (folder == RECYCLE_BIN) {
|
if (folder == RECYCLE_BIN) {
|
||||||
deletedMedia.firstOrNull { it.path == path }?.apply {
|
deletedMedia.firstOrNull { it.path == path }?.apply {
|
||||||
media.add(this)
|
media.add(this)
|
||||||
|
|
Loading…
Reference in a new issue