From dc4eca4b7e3d736728edc68382bb0bd30757a582 Mon Sep 17 00:00:00 2001 From: alexandreferris Date: Fri, 22 Mar 2024 10:46:02 +0100 Subject: [PATCH 1/3] fix: add correct copy to text of dialog and remove Cancel button --- .../main/kotlin/com/wire/android/ui/home/E2EIDialogs.kt | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/app/src/main/kotlin/com/wire/android/ui/home/E2EIDialogs.kt b/app/src/main/kotlin/com/wire/android/ui/home/E2EIDialogs.kt index eedbc2a1bad..eede1534878 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/E2EIDialogs.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/E2EIDialogs.kt @@ -202,7 +202,7 @@ fun E2EIErrorWithDismissDialog( ) { WireDialog( title = stringResource(id = R.string.end_to_end_identity_renew_error_dialog_title), - text = stringResource(id = R.string.end_to_end_identity_renew_error_dialog_text), + text = stringResource(id = R.string.end_to_end_identity_renew_error_dialog_text_no_snooze), onDismiss = onDismiss, optionButton1Properties = WireDialogButtonProperties( onClick = updateCertificate, @@ -210,11 +210,6 @@ fun E2EIErrorWithDismissDialog( type = WireDialogButtonType.Primary, loading = isE2EILoading ), - optionButton2Properties = WireDialogButtonProperties( - onClick = onDismiss, - text = stringResource(id = R.string.label_cancel), - type = WireDialogButtonType.Secondary, - ), buttonsHorizontalAlignment = false, properties = DialogProperties(usePlatformDefaultWidth = false) ) From 18852fff55982c1cb7dde9f60eb510a4996de7f5 Mon Sep 17 00:00:00 2001 From: alexandreferris Date: Fri, 22 Mar 2024 15:24:49 +0100 Subject: [PATCH 2/3] chore: revert changes and make E2EIErrorNoSnoozeDialog not private --- .../main/kotlin/com/wire/android/ui/home/E2EIDialogs.kt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/wire/android/ui/home/E2EIDialogs.kt b/app/src/main/kotlin/com/wire/android/ui/home/E2EIDialogs.kt index eede1534878..a140afe9350 100644 --- a/app/src/main/kotlin/com/wire/android/ui/home/E2EIDialogs.kt +++ b/app/src/main/kotlin/com/wire/android/ui/home/E2EIDialogs.kt @@ -202,7 +202,7 @@ fun E2EIErrorWithDismissDialog( ) { WireDialog( title = stringResource(id = R.string.end_to_end_identity_renew_error_dialog_title), - text = stringResource(id = R.string.end_to_end_identity_renew_error_dialog_text_no_snooze), + text = stringResource(id = R.string.end_to_end_identity_renew_error_dialog_text), onDismiss = onDismiss, optionButton1Properties = WireDialogButtonProperties( onClick = updateCertificate, @@ -210,6 +210,11 @@ fun E2EIErrorWithDismissDialog( type = WireDialogButtonType.Primary, loading = isE2EILoading ), + optionButton2Properties = WireDialogButtonProperties( + onClick = onDismiss, + text = stringResource(id = R.string.label_cancel), + type = WireDialogButtonType.Secondary, + ), buttonsHorizontalAlignment = false, properties = DialogProperties(usePlatformDefaultWidth = false) ) @@ -242,7 +247,7 @@ private fun E2EIErrorWithSnoozeDialog( } @Composable -private fun E2EIErrorNoSnoozeDialog( +fun E2EIErrorNoSnoozeDialog( isE2EILoading: Boolean, updateCertificate: () -> Unit ) { From 6ad9986be139623bd5b24c97cf098db6938ee93b Mon Sep 17 00:00:00 2001 From: alexandreferris Date: Fri, 22 Mar 2024 15:25:00 +0100 Subject: [PATCH 3/3] fix: change correct dialog to be displayed --- .../android/ui/e2eiEnrollment/E2EIEnrollmentScreen.kt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/main/kotlin/com/wire/android/ui/e2eiEnrollment/E2EIEnrollmentScreen.kt b/app/src/main/kotlin/com/wire/android/ui/e2eiEnrollment/E2EIEnrollmentScreen.kt index 55f536fd97d..7c8c1a9073b 100644 --- a/app/src/main/kotlin/com/wire/android/ui/e2eiEnrollment/E2EIEnrollmentScreen.kt +++ b/app/src/main/kotlin/com/wire/android/ui/e2eiEnrollment/E2EIEnrollmentScreen.kt @@ -57,7 +57,7 @@ import com.wire.android.ui.common.topappbar.WireCenterAlignedTopAppBar import com.wire.android.ui.common.visbility.rememberVisibilityState import com.wire.android.ui.destinations.E2eiCertificateDetailsScreenDestination import com.wire.android.ui.destinations.InitialSyncScreenDestination -import com.wire.android.ui.home.E2EIErrorWithDismissDialog +import com.wire.android.ui.home.E2EIErrorNoSnoozeDialog import com.wire.android.ui.home.E2EISuccessDialog import com.wire.android.ui.markdown.MarkdownConstants import com.wire.android.ui.theme.WireTheme @@ -193,10 +193,12 @@ private fun E2EIEnrollmentScreenContent( } if (state.isCertificateEnrollError) { - E2EIErrorWithDismissDialog( + E2EIErrorNoSnoozeDialog( isE2EILoading = state.isLoading, - updateCertificate = enrollE2EICertificate, - onDismiss = dismissErrorDialog + updateCertificate = { + dismissErrorDialog() + enrollE2EICertificate() + } ) }