Using orFalse() extension method on nullable boolean
This commit is contained in:
parent
c45f536855
commit
45b138e53d
|
@ -20,6 +20,7 @@ import im.vector.app.core.di.ActiveSessionHolder
|
||||||
import kotlinx.coroutines.flow.Flow
|
import kotlinx.coroutines.flow.Flow
|
||||||
import kotlinx.coroutines.flow.emptyFlow
|
import kotlinx.coroutines.flow.emptyFlow
|
||||||
import kotlinx.coroutines.flow.map
|
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.session.crypto.crosssigning.MXCrossSigningInfo
|
||||||
import org.matrix.android.sdk.api.util.Optional
|
import org.matrix.android.sdk.api.util.Optional
|
||||||
import org.matrix.android.sdk.flow.flow
|
import org.matrix.android.sdk.flow.flow
|
||||||
|
@ -41,7 +42,7 @@ class GetCurrentSessionCrossSigningInfoUseCase @Inject constructor(
|
||||||
return CurrentSessionCrossSigningInfo(
|
return CurrentSessionCrossSigningInfo(
|
||||||
deviceId = deviceId,
|
deviceId = deviceId,
|
||||||
isCrossSigningInitialized = mxCrossSigningInfo.getOrNull() != null,
|
isCrossSigningInitialized = mxCrossSigningInfo.getOrNull() != null,
|
||||||
isCrossSigningVerified = mxCrossSigningInfo.getOrNull()?.isTrusted() == true
|
isCrossSigningVerified = mxCrossSigningInfo.getOrNull()?.isTrusted().orFalse()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue