changes to allow attaching any type of file. mainly for video and audio attachments but nothing to stop any type of file being attached

This commit is contained in:
gavine99
2025-01-26 16:57:36 +11:00
parent 33347fa157
commit 314704a61a
27 changed files with 505 additions and 197 deletions
@@ -40,11 +40,13 @@ open class MmsPart : RealmObject() {
fun getUri() = "content://mms/part/$id".toUri()
fun getSummary(): String? = when {
type == "application/smil" -> null
type == "text/plain" -> text
type == "text/x-vCard" -> "Contact card"
type == "text/x-vcard" -> "Contact card"
type.startsWith("image") -> "Photo"
type.startsWith("video") -> "Video"
else -> null
type.startsWith("audio") -> "Audio"
else -> type.substring(type.indexOf('/') + 1)
}
}