Provide more detailed message summary

This commit is contained in:
moezbhatti
2018-12-26 00:39:54 -05:00
parent 5a12b4c133
commit 8e46c45df6
3 changed files with 22 additions and 11 deletions
@@ -35,4 +35,12 @@ open class MmsPart : RealmObject() {
fun getUri() = "content://mms/part/$id".toUri()
fun getSummary(): String? = when {
type == "text/plain" -> text
type == "text/x-vCard" -> "Contact card"
type.startsWith("image") -> "Photo"
type.startsWith("video") -> "Video"
else -> null
}
}