use single function for synchronously obtaining contact

This commit is contained in:
Moez Bhatti
2017-08-28 16:53:06 -07:00
parent 39be6fee0b
commit ece5a8e93b
3 changed files with 13 additions and 17 deletions
@@ -30,7 +30,7 @@ open class Conversation() : RealmObject() {
Flowable.fromIterable(cursor.getString(ConversationColumns.RECIPIENT_IDS).split(" "))
.map { id -> id.toLong() }
.map { id -> contacts.getContact(id) }
.map { id -> contacts.getContactBlocking(id) }
.filter { contact -> contact.recipientId != 0L }
.blockingSubscribe { contact -> this.contacts.add(contact) }