From af701fb8c62ce1ac576797df90102bbdf7adf480 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=BBerko?= Date: Mon, 4 Mar 2024 13:36:33 +0100 Subject: [PATCH] fix: e2e webview login cancels when opening from dialog --- .../wire/android/ui/e2eiEnrollment/GetE2EICertificateUI.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/com/wire/android/ui/e2eiEnrollment/GetE2EICertificateUI.kt b/app/src/main/kotlin/com/wire/android/ui/e2eiEnrollment/GetE2EICertificateUI.kt index 65a869c0167..9a844bea755 100644 --- a/app/src/main/kotlin/com/wire/android/ui/e2eiEnrollment/GetE2EICertificateUI.kt +++ b/app/src/main/kotlin/com/wire/android/ui/e2eiEnrollment/GetE2EICertificateUI.kt @@ -39,7 +39,6 @@ fun GetE2EICertificateUI( val coroutineScope = rememberCoroutineScope() val context = LocalContext.current - // FIXME issue happens when this UI is called from WireActivity: WebView is just canceled by itself LaunchedEffect(Unit) { viewModel.requestOAuthFlow.onEach { OAuthUseCase(context, it.target, it.oAuthClaims, it.oAuthState).launch( @@ -51,6 +50,7 @@ fun GetE2EICertificateUI( LaunchedEffect(Unit) { viewModel.enrollmentResultFlow.onEach { enrollmentResultHandler(it) }.launchIn(coroutineScope) } - - viewModel.getCertificate(isNewClient) + LaunchedEffect(Unit) { + viewModel.getCertificate(isNewClient) + } }