forked from upstream-mirrors/quik
display contact names loaded from db
This commit is contained in:
@@ -7,10 +7,8 @@ open class Contact() : RealmObject() {
|
||||
|
||||
@PrimaryKey var recipientId: Long = 0
|
||||
var address: String = ""
|
||||
var name: String = ""
|
||||
|
||||
/**
|
||||
* For inflating the contact using the cursor
|
||||
*/
|
||||
constructor(id: Long, address: String) : this() {
|
||||
this.recipientId = id
|
||||
this.address = address
|
||||
|
||||
@@ -44,7 +44,7 @@ open class Conversation() : RealmObject() {
|
||||
fun getTitle(): String {
|
||||
var title = ""
|
||||
contacts.forEachIndexed { index, recipient ->
|
||||
title += recipient.address
|
||||
title += if (recipient.name.isNotEmpty()) recipient.name else recipient.address
|
||||
if (index < contacts.size - 1) {
|
||||
title += ", "
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user