mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Avoid tryEmit(), use emit()
This commit is contained in:
committed by
Benoit Marty
parent
a83952814f
commit
74048cca8f
+5
-5
@@ -48,30 +48,30 @@ class FakeNotificationTroubleshootTest(
|
||||
}
|
||||
}
|
||||
|
||||
override fun reset() {
|
||||
override suspend fun reset() {
|
||||
updateState(
|
||||
name = defaultName,
|
||||
description = defaultDescription,
|
||||
status = firstStatus,
|
||||
)
|
||||
resetAction()?.let {
|
||||
_state.tryEmit(it)
|
||||
_state.emit(it)
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun quickFix(coroutineScope: CoroutineScope) {
|
||||
updateState(NotificationTroubleshootTestState.Status.InProgress)
|
||||
quickFixAction()?.let {
|
||||
_state.tryEmit(it)
|
||||
_state.emit(it)
|
||||
}
|
||||
}
|
||||
|
||||
fun updateState(
|
||||
suspend fun updateState(
|
||||
status: NotificationTroubleshootTestState.Status,
|
||||
name: String = defaultName,
|
||||
description: String = defaultDescription,
|
||||
) {
|
||||
_state.tryEmit(
|
||||
_state.emit(
|
||||
NotificationTroubleshootTestState(
|
||||
name = name,
|
||||
description = description,
|
||||
|
||||
Reference in New Issue
Block a user