add more handling for Portrait file type

This commit is contained in:
tibbi 2019-09-29 23:18:40 +02:00
parent bc455addb4
commit e684c660b5
3 changed files with 10 additions and 2 deletions

View file

@ -25,5 +25,9 @@ fun ArrayList<Medium>.getDirMediaTypes(): Int {
types += TYPE_SVGS
}
if (any { it.isPortrait() }) {
types += TYPE_PORTRAITS
}
return types
}

View file

@ -584,7 +584,8 @@ fun Context.getCachedDirectories(getVideosOnly: Boolean = false, getImagesOnly:
(filterMedia and TYPE_VIDEOS != 0 && it.types and TYPE_VIDEOS != 0) ||
(filterMedia and TYPE_GIFS != 0 && it.types and TYPE_GIFS != 0) ||
(filterMedia and TYPE_RAWS != 0 && it.types and TYPE_RAWS != 0) ||
(filterMedia and TYPE_SVGS != 0 && it.types and TYPE_SVGS != 0)
(filterMedia and TYPE_SVGS != 0 && it.types and TYPE_SVGS != 0) ||
(filterMedia and TYPE_PORTRAITS != 0 && it.types and TYPE_PORTRAITS != 0)
}
}) as ArrayList<Directory>
@ -640,7 +641,8 @@ fun Context.getCachedMedia(path: String, getVideosOnly: Boolean = false, getImag
(filterMedia and TYPE_VIDEOS != 0 && it.type == TYPE_VIDEOS) ||
(filterMedia and TYPE_GIFS != 0 && it.type == TYPE_GIFS) ||
(filterMedia and TYPE_RAWS != 0 && it.type == TYPE_RAWS) ||
(filterMedia and TYPE_SVGS != 0 && it.type == TYPE_SVGS)
(filterMedia and TYPE_SVGS != 0 && it.type == TYPE_SVGS) ||
(filterMedia and TYPE_PORTRAITS != 0 && it.type == TYPE_PORTRAITS)
}
}) as ArrayList<Medium>

View file

@ -44,6 +44,8 @@ data class Medium(
fun isSVG() = type == TYPE_SVGS
fun isPortrait() = type == TYPE_PORTRAITS
fun isHidden() = name.startsWith('.')
fun getBubbleText(sorting: Int, context: Context) = when {