No need to launch a coroutine to send the first value.

This commit is contained in:
Benoit Marty
2024-09-24 16:01:58 +02:00
parent 4a1aafae43
commit 72ca2f9eb0

View File

@@ -116,10 +116,8 @@ class RustMatrixRoom(
}
override val roomTypingMembersFlow: Flow<List<UserId>> = mxCallbackFlow {
launch {
val initial = emptyList<UserId>()
channel.trySend(initial)
}
val initial = emptyList<UserId>()
channel.trySend(initial)
innerRoom.subscribeToTypingNotifications(object : TypingNotificationsListener {
override fun call(typingUserIds: List<String>) {
channel.trySend(