From 45b138e53d77335b98a5f8238f145a4dbb9a0953 Mon Sep 17 00:00:00 2001 From: Maxime NATUREL Date: Wed, 7 Sep 2022 17:09:57 +0200 Subject: [PATCH] Using orFalse() extension method on nullable boolean --- .../devices/v2/GetCurrentSessionCrossSigningInfoUseCase.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vector/src/main/java/im/vector/app/features/settings/devices/v2/GetCurrentSessionCrossSigningInfoUseCase.kt b/vector/src/main/java/im/vector/app/features/settings/devices/v2/GetCurrentSessionCrossSigningInfoUseCase.kt index f41b3d4cf8..cc848342de 100644 --- a/vector/src/main/java/im/vector/app/features/settings/devices/v2/GetCurrentSessionCrossSigningInfoUseCase.kt +++ b/vector/src/main/java/im/vector/app/features/settings/devices/v2/GetCurrentSessionCrossSigningInfoUseCase.kt @@ -20,6 +20,7 @@ import im.vector.app.core.di.ActiveSessionHolder import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.emptyFlow import kotlinx.coroutines.flow.map +import org.matrix.android.sdk.api.extensions.orFalse import org.matrix.android.sdk.api.session.crypto.crosssigning.MXCrossSigningInfo import org.matrix.android.sdk.api.util.Optional import org.matrix.android.sdk.flow.flow @@ -41,7 +42,7 @@ class GetCurrentSessionCrossSigningInfoUseCase @Inject constructor( return CurrentSessionCrossSigningInfo( deviceId = deviceId, isCrossSigningInitialized = mxCrossSigningInfo.getOrNull() != null, - isCrossSigningVerified = mxCrossSigningInfo.getOrNull()?.isTrusted() == true + isCrossSigningVerified = mxCrossSigningInfo.getOrNull()?.isTrusted().orFalse() ) } }