Use in-memory thumbnail APIs when possible (#3817)
* Use in-memory thumbnail APIs when possible * Make an exception for animated image types. Also add `TimelineItemImageContent.thumbnailMediaRequestData` lazy property. * Try simplifying the logic a bit more.
This commit is contained in:
committed by
GitHub
parent
f77ac55ec5
commit
4e9a75f10e
@@ -38,6 +38,7 @@ object MimeTypes {
|
||||
fun String?.normalizeMimeType() = if (this == BadJpg) Jpeg else this
|
||||
|
||||
fun String?.isMimeTypeImage() = this?.startsWith("image/").orFalse()
|
||||
fun String?.isMimeTypeAnimatedImage() = this == Gif || this == WebP
|
||||
fun String?.isMimeTypeVideo() = this?.startsWith("video/").orFalse()
|
||||
fun String?.isMimeTypeAudio() = this?.startsWith("audio/").orFalse()
|
||||
fun String?.isMimeTypeApplication() = this?.startsWith("application/").orFalse()
|
||||
|
||||
Reference in New Issue
Block a user