Improve conversation name retrieval

This commit is contained in:
Moez Bhatti
2017-12-24 21:40:20 -05:00
parent 509648c52b
commit 934847647b
@@ -13,7 +13,8 @@ open class Conversation : RealmObject() {
fun getTitle(): String {
var title = ""
recipients.forEachIndexed { index, recipient ->
title += recipient.contact?.name ?: recipient.address
val name = recipient.contact?.name
title += if (name.isNullOrBlank()) recipient.address else name
if (index < recipients.size - 1) {
title += ", "
}