Improve unknown attachment preview

This commit is contained in:
Naveen 2022-10-23 18:34:43 +05:30
parent c8a7857821
commit 8d75d5b133
5 changed files with 96 additions and 72 deletions

View file

@ -15,6 +15,10 @@ fun String.isImageMimeType(): Boolean {
return lowercase().startsWith("image")
}
fun String.isVideoMimeType(): Boolean {
return lowercase().startsWith("video")
}
fun String.isVCardMimeType(): Boolean {
val lowercase = lowercase()
return lowercase.endsWith("x-vcard") || lowercase.endsWith("vcard")