store recipient model instead of recipients string in conversation

This commit is contained in:
Moez Bhatti
2017-08-22 19:51:01 -07:00
parent a32dd041ee
commit edba4eadbe
5 changed files with 48 additions and 6 deletions
@@ -30,7 +30,15 @@ class ConversationAdapter(context: Context, data: OrderedRealmCollection<Convers
mContext.startActivity(intent)
}
viewHolder.title.text = conversation?.recipientIds.toString()
var title = ""
conversation?.recipients?.forEachIndexed { index, recipient ->
title += recipient.id
if (index < conversation.recipients.size - 1) {
title += ", "
}
}
viewHolder.title.text = title
viewHolder.snippet.text = conversation?.snippet
}
}