Make sure that new conversations appear in list after creation

This commit is contained in:
Moez Bhatti
2019-12-01 02:54:40 -05:00
parent a83901a731
commit 4794167b6b
@@ -170,6 +170,7 @@ class ConversationRepositoryImpl @Inject constructor(
override fun getConversation(threadId: Long): Conversation? {
return Realm.getDefaultInstance()
.apply { refresh() }
.where(Conversation::class.java)
.equalTo("id", threadId)
.findFirst()
@@ -195,6 +196,7 @@ class ConversationRepositoryImpl @Inject constructor(
override fun getThreadId(recipients: Collection<String>): Long? {
return Realm.getDefaultInstance().use { realm ->
realm.refresh()
realm.where(Conversation::class.java)
.findAll()
.asSequence()