Provide MutableStateFlow in the constructor of the fake class.

This commit is contained in:
Benoit Marty 2024-11-06 17:29:20 +01:00
parent 2b5acb3023
commit db4b4d3fa4
2 changed files with 7 additions and 11 deletions

View file

@ -12,11 +12,5 @@ import io.element.android.features.call.api.CurrentCallService
import kotlinx.coroutines.flow.MutableStateFlow
class FakeCurrentCallService(
initialValue: CurrentCall = CurrentCall.None,
) : CurrentCallService {
override val currentCall = MutableStateFlow(initialValue)
fun setCurrentCall(value: CurrentCall) {
currentCall.value = value
}
}
override val currentCall: MutableStateFlow<CurrentCall> = MutableStateFlow(CurrentCall.None),
) : CurrentCallService