mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-22 21:58:53 +01:00
Improve conversation name retrieval
This commit is contained in:
@@ -13,7 +13,8 @@ open class Conversation : RealmObject() {
|
|||||||
fun getTitle(): String {
|
fun getTitle(): String {
|
||||||
var title = ""
|
var title = ""
|
||||||
recipients.forEachIndexed { index, recipient ->
|
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) {
|
if (index < recipients.size - 1) {
|
||||||
title += ", "
|
title += ", "
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user