Kd
Size: a a a
Kd
AA
Kd
Kd
AA
AA
AA
Kd
Kd
Kd
АВ
АВ
AA
АВ
(
(
class SomePresenter {и
private val stateFlow = MutableStateFlow(initialState)
fun someFun() {
...
stateFlow.value = someNewState
}
fun state(): Flow<State> = stateFlow
}
class SomeView {
private val presenter = Presenter()
fun onAttach() {
presenter.state().onEach { render(it) }.launchIn(CoroutineScope(Dispatchers.Main + SupervisorJob()))
}
...
}
(
render
срабатывает только один раз, а потом не срабатывает, хотя stateFlow.value = someNewState
выполняется исправно(
Kd
I