Show custom/random colours in compose screen

This commit is contained in:
Moez Bhatti
2019-12-26 19:34:39 -05:00
parent 6842374254
commit d6dcc55a36
4 changed files with 61 additions and 5 deletions
@@ -206,6 +206,17 @@ class ConversationRepositoryImpl @Inject constructor(
.observeOn(Schedulers.io())
}
override fun getUnmanagedRecipients(): Observable<List<Recipient>> {
val realm = Realm.getDefaultInstance()
return realm.where(Recipient::class.java)
.isNotNull("contact")
.findAllAsync()
.asObservable()
.filter { it.isLoaded && it.isValid }
.map { realm.copyFromRealm(it) }
.subscribeOn(AndroidSchedulers.mainThread())
}
override fun getRecipient(recipientId: Long): Recipient? {
return Realm.getDefaultInstance()
.where(Recipient::class.java)