Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4794167b authored by Moez Bhatti's avatar Moez Bhatti
Browse files

Make sure that new conversations appear in list after creation

parent a83901a7
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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()