Provide MutableStateFlow in the constructor of the fake class.
This commit is contained in:
parent
2b5acb3023
commit
db4b4d3fa4
2 changed files with 7 additions and 11 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue