Fix list updates (it was isEqual)
This commit is contained in:
@@ -41,7 +41,8 @@ data class Conversation(
|
||||
date == o.date &&
|
||||
participants == o.participants &&
|
||||
displayName == o.displayName &&
|
||||
unreadCount == o.unreadCount
|
||||
unreadCount == o.unreadCount &&
|
||||
lastMessagePreview == o.lastMessagePreview
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import kotlinx.coroutines.cancel
|
||||
import kotlinx.coroutines.channels.Channel
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.collect
|
||||
import kotlinx.coroutines.flow.onEach
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import net.buzzert.kordophone.backend.db.CachedChatDatabase
|
||||
@@ -38,6 +39,7 @@ class ChatRepository(
|
||||
// Changes Flow
|
||||
val conversationChanges: Flow<List<Conversation>>
|
||||
get() = database.conversationChanges
|
||||
.onEach { Log.d(REPO_LOG, "Got database conversations changed") }
|
||||
|
||||
fun messagesChanged(conversation: Conversation): Flow<List<Message>> =
|
||||
database.messagesChanged(conversation)
|
||||
|
||||
Reference in New Issue
Block a user