Display blocked conversations in blocked tab

This commit is contained in:
Moez Bhatti
2018-03-05 17:51:52 -05:00
parent a45c49c54b
commit 45d6e5cb6f
7 changed files with 143 additions and 26 deletions
@@ -88,11 +88,14 @@ class MessageRepository @Inject constructor(
})
}
fun getBlockedConversations(): RealmResults<Conversation> {
fun getBlockedConversations(): Flowable<List<Conversation>> {
return Realm.getDefaultInstance()
.where(Conversation::class.java)
.equalTo("blocked", true)
.findAll()
.findAllAsync()
.asFlowable()
.filter { it.isLoaded }
.map { it.toList() }
}
fun getConversationAsync(threadId: Long): Conversation {