From a3cb7ab26508684328f812fb0d6d23699fca6f02 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 27 Mar 2024 16:19:05 +0100 Subject: [PATCH] use emit instead of tryEmit --- .../impl/notifications/troubleshoot/TroubleshootTestSuite.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/troubleshoot/TroubleshootTestSuite.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/troubleshoot/TroubleshootTestSuite.kt index 41fad1c3d5..361cf1601f 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/troubleshoot/TroubleshootTestSuite.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/troubleshoot/TroubleshootTestSuite.kt @@ -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( } else -> Unit } - _state.tryEmit( + _state.emit( TroubleshootTestSuiteState( mainState = states.computeMainState(), tests = states.toImmutableList()