mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 06:55:41 +00:00
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:
committed by
GitHub
parent
134cacb024
commit
e4aed6b56c
+1
-2
@@ -62,7 +62,6 @@ import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.MutableSharedFlow
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.SharedFlow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import java.io.File
|
||||
|
||||
@@ -180,7 +179,7 @@ class FakeMatrixRoom(
|
||||
private var leaveRoomError: Throwable? = null
|
||||
|
||||
private val _roomInfoFlow: MutableSharedFlow<MatrixRoomInfo> = MutableSharedFlow(replay = 1)
|
||||
override val roomInfoFlow: SharedFlow<MatrixRoomInfo> = _roomInfoFlow
|
||||
override val roomInfoFlow: Flow<MatrixRoomInfo> = _roomInfoFlow
|
||||
|
||||
private val _roomTypingMembersFlow: MutableSharedFlow<List<UserId>> = MutableSharedFlow(replay = 1)
|
||||
override val roomTypingMembersFlow: Flow<List<UserId>> = _roomTypingMembersFlow
|
||||
|
||||
Reference in New Issue
Block a user