Browse Source

use emit instead of tryEmit

pull/2596/head
Benoit Marty 6 months ago committed by Benoit Marty
parent
commit
a3cb7ab265
  1. 4
      features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/troubleshoot/TroubleshootTestSuite.kt

4
features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/troubleshoot/TroubleshootTestSuite.kt

@ -78,7 +78,7 @@ class TroubleshootTestSuite @Inject constructor( @@ -78,7 +78,7 @@ class TroubleshootTestSuite @Inject constructor(
}
}
private fun emitState() {
private suspend fun emitState() {
val states = tests.map { it.state.value }
val mainState = states.computeMainState()
when (mainState) {
@ -90,7 +90,7 @@ class TroubleshootTestSuite @Inject constructor( @@ -90,7 +90,7 @@ class TroubleshootTestSuite @Inject constructor(
}
else -> Unit
}
_state.tryEmit(
_state.emit(
TroubleshootTestSuiteState(
mainState = states.computeMainState(),
tests = states.toImmutableList()

Loading…
Cancel
Save