Fix crash when leaving room using LeaveRoomPresenter (#2498)
This happened because `roomInfoFlow` was shared eagerly and the `initial` part was called after the `Room` Rust object was destroyed. I think there isn't a need for room info to be shared, it was a mistake I forgot to rollback.
This commit is contained in:
parent
134cacb024
commit
e4aed6b56c
3 changed files with 3 additions and 9 deletions
|
|
@ -37,7 +37,6 @@ import io.element.android.libraries.matrix.api.widget.MatrixWidgetSettings
|
|||
import kotlinx.collections.immutable.ImmutableList
|
||||
import kotlinx.collections.immutable.toPersistentList
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.SharedFlow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import kotlinx.coroutines.flow.combine
|
||||
import kotlinx.coroutines.flow.distinctUntilChanged
|
||||
|
|
@ -63,7 +62,7 @@ interface MatrixRoom : Closeable {
|
|||
/** Whether the room is a direct message. */
|
||||
val isDm: Boolean get() = isDirect && isOneToOne
|
||||
|
||||
val roomInfoFlow: SharedFlow<MatrixRoomInfo>
|
||||
val roomInfoFlow: Flow<MatrixRoomInfo>
|
||||
val roomTypingMembersFlow: Flow<List<UserId>>
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue