From a2dee2193afa8d451cff9b012ae33ad40bd0f2cc Mon Sep 17 00:00:00 2001 From: Florian Renaud Date: Thu, 24 Nov 2022 16:36:35 +0100 Subject: [PATCH] Fix bad condition --- .../usecase/GetMostRecentVoiceBroadcastStateEventUseCase.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/voicebroadcast/usecase/GetMostRecentVoiceBroadcastStateEventUseCase.kt b/vector/src/main/java/im/vector/app/features/voicebroadcast/usecase/GetMostRecentVoiceBroadcastStateEventUseCase.kt index b882d1625b..a401e8c157 100644 --- a/vector/src/main/java/im/vector/app/features/voicebroadcast/usecase/GetMostRecentVoiceBroadcastStateEventUseCase.kt +++ b/vector/src/main/java/im/vector/app/features/voicebroadcast/usecase/GetMostRecentVoiceBroadcastStateEventUseCase.kt @@ -31,7 +31,7 @@ import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.onEach import kotlinx.coroutines.flow.onStart import kotlinx.coroutines.flow.transformWhile -import org.matrix.android.sdk.api.extensions.orFalse +import org.matrix.android.sdk.api.extensions.orTrue import org.matrix.android.sdk.api.query.QueryStringValue import org.matrix.android.sdk.api.session.Session import org.matrix.android.sdk.api.session.events.model.RelationType @@ -125,7 +125,7 @@ class GetMostRecentVoiceBroadcastStateEventUseCase @Inject constructor( event.hasValue() && event.get().root.isRedacted().not() } .flatMapLatest { event -> - if (event.getOrNull()?.root?.isRedacted().orFalse()) { + if (event.getOrNull()?.root?.isRedacted().orTrue()) { // event is null or redacted, switch to the latest not redacted event getMostRecentRelatedEventFlow(room, voiceBroadcast) } else {