diff --git a/vector/src/androidTest/java/im/vector/app/SecurityBootstrapTest.kt b/vector/src/androidTest/java/im/vector/app/SecurityBootstrapTest.kt index 3bf17aa043..3ab8fe7dd9 100644 --- a/vector/src/androidTest/java/im/vector/app/SecurityBootstrapTest.kt +++ b/vector/src/androidTest/java/im/vector/app/SecurityBootstrapTest.kt @@ -96,7 +96,7 @@ class SecurityBootstrapTest : VerificationTestBase() { .check(matches(isDisplayed())) } - activity.navigator.open4SSetup(activity, SetupMode.NORMAL, null) + activity.navigator.open4SSetup(activity, SetupMode.NORMAL) Thread.sleep(1000) diff --git a/vector/src/main/java/im/vector/app/features/crypto/quads/SharedSecureStorageActivity.kt b/vector/src/main/java/im/vector/app/features/crypto/quads/SharedSecureStorageActivity.kt index 6f7ea1fd46..42d000ecc3 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/quads/SharedSecureStorageActivity.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/quads/SharedSecureStorageActivity.kt @@ -114,7 +114,7 @@ class SharedSecureStorageActivity : SimpleFragmentActivity(), VectorBaseBottomSh finish() } is SharedSecureStorageViewEvent.ShowResetBottomSheet -> { - navigator.open4SSetup(this, SetupMode.HARD_RESET, this) + navigator.open4SSetup(this, SetupMode.HARD_RESET) } } } diff --git a/vector/src/main/java/im/vector/app/features/crypto/verification/VerificationAction.kt b/vector/src/main/java/im/vector/app/features/crypto/verification/VerificationAction.kt index d0fd825ebb..a32a9de97f 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/verification/VerificationAction.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/verification/VerificationAction.kt @@ -31,5 +31,5 @@ sealed class VerificationAction : VectorViewModelAction { object SkipVerification : VerificationAction() object VerifyFromPassphrase : VerificationAction() data class GotResultFromSsss(val cypherData: String, val alias: String) : VerificationAction() - object SecuredStorageHasBeenReseted : VerificationAction() + object SecuredStorageHasBeenReset : VerificationAction() } diff --git a/vector/src/main/java/im/vector/app/features/crypto/verification/VerificationBottomSheet.kt b/vector/src/main/java/im/vector/app/features/crypto/verification/VerificationBottomSheet.kt index 03c988115c..c7ce4d6f01 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/verification/VerificationBottomSheet.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/verification/VerificationBottomSheet.kt @@ -148,12 +148,12 @@ class VerificationBottomSheet : VectorBaseBottomSheetDialogFragment() { override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { if (resultCode == Activity.RESULT_OK && requestCode == SECRET_REQUEST_CODE) { val result = data?.getStringExtra(SharedSecureStorageActivity.EXTRA_DATA_RESULT) - val reseted = data?.getBooleanExtra(SharedSecureStorageActivity.EXTRA_DATA_RESET, false) ?: false + val reset = data?.getBooleanExtra(SharedSecureStorageActivity.EXTRA_DATA_RESET, false) ?: false if (result != null) { viewModel.handle(VerificationAction.GotResultFromSsss(result, SharedSecureStorageActivity.DEFAULT_RESULT_KEYSTORE_ALIAS)) - } else if (reseted) { + } else if (reset) { // all have been reset, so we are verified? - viewModel.handle(VerificationAction.SecuredStorageHasBeenReseted) + viewModel.handle(VerificationAction.SecuredStorageHasBeenReset) } } super.onActivityResult(requestCode, resultCode, data) diff --git a/vector/src/main/java/im/vector/app/features/crypto/verification/VerificationBottomSheetViewModel.kt b/vector/src/main/java/im/vector/app/features/crypto/verification/VerificationBottomSheetViewModel.kt index a7f47b1172..3c00478ab0 100644 --- a/vector/src/main/java/im/vector/app/features/crypto/verification/VerificationBottomSheetViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/crypto/verification/VerificationBottomSheetViewModel.kt @@ -351,7 +351,7 @@ class VerificationBottomSheetViewModel @AssistedInject constructor( is VerificationAction.GotResultFromSsss -> { handleSecretBackFromSSSS(action) } - VerificationAction.SecuredStorageHasBeenReseted -> { + VerificationAction.SecuredStorageHasBeenReset -> { if (session.cryptoService().crossSigningService().allPrivateKeysKnown()) { setState { copy(quadSHasBeenReset = true) diff --git a/vector/src/main/java/im/vector/app/features/navigation/DefaultNavigator.kt b/vector/src/main/java/im/vector/app/features/navigation/DefaultNavigator.kt index 66dd9544b4..8a60e4a176 100644 --- a/vector/src/main/java/im/vector/app/features/navigation/DefaultNavigator.kt +++ b/vector/src/main/java/im/vector/app/features/navigation/DefaultNavigator.kt @@ -238,11 +238,9 @@ class DefaultNavigator @Inject constructor( } } - override fun open4SSetup(context: Context, setupMode: SetupMode, listener: VectorBaseBottomSheetDialogFragment.ResultListener?) { + override fun open4SSetup(context: Context, setupMode: SetupMode) { if (context is VectorBaseActivity) { - BootstrapBottomSheet.show(context.supportFragmentManager, setupMode).also { - it.resultListener = listener - } + BootstrapBottomSheet.show(context.supportFragmentManager, setupMode) } } diff --git a/vector/src/main/java/im/vector/app/features/navigation/Navigator.kt b/vector/src/main/java/im/vector/app/features/navigation/Navigator.kt index 3f255f72ef..e92fea267f 100644 --- a/vector/src/main/java/im/vector/app/features/navigation/Navigator.kt +++ b/vector/src/main/java/im/vector/app/features/navigation/Navigator.kt @@ -21,7 +21,6 @@ import android.content.Context import android.view.View import androidx.core.util.Pair import androidx.fragment.app.Fragment -import im.vector.app.core.platform.VectorBaseBottomSheetDialogFragment import im.vector.app.features.crypto.recover.SetupMode import im.vector.app.features.home.room.detail.widget.WidgetRequestCodes import im.vector.app.features.media.AttachmentData @@ -73,7 +72,7 @@ interface Navigator { fun openKeysBackupSetup(context: Context, showManualExport: Boolean) - fun open4SSetup(context: Context, setupMode: SetupMode, listener: VectorBaseBottomSheetDialogFragment.ResultListener?) + fun open4SSetup(context: Context, setupMode: SetupMode) fun openKeysBackupManager(context: Context)