mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 06:55:41 +00:00
use emit instead of tryEmit
This commit is contained in:
committed by
Benoit Marty
parent
8da435b514
commit
a3cb7ab265
+2
-2
@@ -78,7 +78,7 @@ class TroubleshootTestSuite @Inject constructor(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun emitState() {
|
private suspend fun emitState() {
|
||||||
val states = tests.map { it.state.value }
|
val states = tests.map { it.state.value }
|
||||||
val mainState = states.computeMainState()
|
val mainState = states.computeMainState()
|
||||||
when (mainState) {
|
when (mainState) {
|
||||||
@@ -90,7 +90,7 @@ class TroubleshootTestSuite @Inject constructor(
|
|||||||
}
|
}
|
||||||
else -> Unit
|
else -> Unit
|
||||||
}
|
}
|
||||||
_state.tryEmit(
|
_state.emit(
|
||||||
TroubleshootTestSuiteState(
|
TroubleshootTestSuiteState(
|
||||||
mainState = states.computeMainState(),
|
mainState = states.computeMainState(),
|
||||||
tests = states.toImmutableList()
|
tests = states.toImmutableList()
|
||||||
|
|||||||
Reference in New Issue
Block a user