From 6edde6a6b9c605cdba8f46bbd60a3c571cee16ce Mon Sep 17 00:00:00 2001 From: valere Date: Tue, 7 Feb 2023 09:27:18 +0100 Subject: [PATCH] Ensure secureBackupRequired is enforced --- .../verification/self/SelfVerificationViewModel.kt | 1 + .../im/vector/app/features/home/HomeActivity.kt | 14 ++------------ 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/crypto/verification/self/SelfVerificationViewModel.kt b/vector/src/main/java/im/vector/app/features/crypto/verification/self/SelfVerificationViewModel.kt index ece1c9c92a..e92616f7df 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/verification/self/SelfVerificationViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/verification/self/SelfVerificationViewModel.kt @@ -395,6 +395,7 @@ class SelfVerificationViewModel @AssistedInject constructor( if (state.isThisSessionVerified) { // we are the verified session, so just dismiss? // do we want to prompt confirm?? + _viewEvents.post(VerificationBottomSheetViewEvents.Dismiss) } else { // cancel the active request and go back? setState { diff --git a/vector/src/main/java/im/vector/app/features/home/HomeActivity.kt b/vector/src/main/java/im/vector/app/features/home/HomeActivity.kt index a2054f6673..a0d28ffe44 100644 --- a/vector/src/main/java/im/vector/app/features/home/HomeActivity.kt +++ b/vector/src/main/java/im/vector/app/features/home/HomeActivity.kt @@ -257,12 +257,7 @@ class HomeActivity : HomeActivityViewEvents.PromptToEnableSessionPush -> handlePromptToEnablePush() HomeActivityViewEvents.StartRecoverySetupFlow -> handleStartRecoverySetup() is HomeActivityViewEvents.ForceVerification -> { - // TODO -// if (it.sendRequest) { - navigator.requestSelfSessionVerification(this) -// } else { -// navigator.waitSessionVerification(this) -// } + navigator.requestSelfSessionVerification(this) } is HomeActivityViewEvents.OnCrossSignedInvalidated -> handleCrossSigningInvalidated(it) HomeActivityViewEvents.ShowAnalyticsOptIn -> handleShowAnalyticsOptIn() @@ -479,12 +474,7 @@ class HomeActivity : titleRes = R.string.crosssigning_verify_this_session, descRes = R.string.confirm_your_identity, ) { -// navigator.openSettings(this, SettingsActivityPayload.SecurityPrivacy) -// if (event.waitForIncomingRequest) { -// //it.navigator.waitSessionVerification(it) -// } else { - it.navigator.requestSelfSessionVerification(it) -// } + it.navigator.requestSelfSessionVerification(it) } }