Make sure to show latest snippet in conversation list

This commit is contained in:
Moez Bhatti
2017-09-25 17:11:58 -04:00
parent 36389c9864
commit bdc84dfe1e
@@ -23,8 +23,8 @@ class MessageRepository(val context: Context) {
fun getConversationMessagesAsync(): RealmResults<Message> {
return Realm.getDefaultInstance()
.where(Message::class.java)
.findAllSortedAsync("date", Sort.DESCENDING)
.distinctAsync("threadId")
.sort("date", Sort.DESCENDING)
}
fun getConversationAsync(threadId: Long): Conversation {