From 28869f4382d4ef369cf3cb13e8a730443a4b63e4 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 10 Jul 2020 12:19:25 +0200 Subject: [PATCH] Small cleanup before merge --- .../crypto/verification/DefaultVerificationService.kt | 2 +- .../vector/riotx/features/navigation/DefaultNavigator.kt | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/verification/DefaultVerificationService.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/verification/DefaultVerificationService.kt index dcee12c165..4d4eeb21fd 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/verification/DefaultVerificationService.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/crypto/verification/DefaultVerificationService.kt @@ -1234,7 +1234,7 @@ internal class DefaultVerificationService @Inject constructor( ) // We can SCAN or SHOW QR codes only if cross-signing is enabled - val methodValues = if (crossSigningService.getMyCrossSigningKeys() != null) { + val methodValues = if (crossSigningService.isCrossSigningInitialized()) { // Add reciprocate method if application declares it can scan or show QR codes // Not sure if it ok to do that (?) val reciprocateMethod = methods diff --git a/vector/src/main/java/im/vector/riotx/features/navigation/DefaultNavigator.kt b/vector/src/main/java/im/vector/riotx/features/navigation/DefaultNavigator.kt index 6907544252..83f0baa12c 100644 --- a/vector/src/main/java/im/vector/riotx/features/navigation/DefaultNavigator.kt +++ b/vector/src/main/java/im/vector/riotx/features/navigation/DefaultNavigator.kt @@ -118,9 +118,10 @@ class DefaultNavigator @Inject constructor( override fun requestSelfSessionVerification(context: Context) { val session = sessionHolder.getSafeActiveSession() ?: return - val otherSessions = session.cryptoService().getCryptoDeviceInfo(session.myUserId).filter { - it.deviceId != session.sessionParams.deviceId - }.map { it.deviceId } + val otherSessions = session.cryptoService() + .getCryptoDeviceInfo(session.myUserId) + .filter { it.deviceId != session.sessionParams.deviceId } + .map { it.deviceId } if (context is VectorBaseActivity) { if (otherSessions.isNotEmpty()) { val pr = session.cryptoService().verificationService().requestKeyVerification(