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 6739084bc5d..a8c3285779d 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
@@ -53,7 +53,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.E2EIErrorNoSnoozeDialog
+import com.wire.android.ui.home.E2EIEnrollmentErrorWithDismissDialog
import com.wire.android.ui.home.E2EISuccessDialog
import com.wire.android.ui.markdown.MarkdownConstants
import com.wire.android.ui.theme.WireTheme
@@ -190,12 +190,10 @@ private fun E2EIEnrollmentScreenContent(
}
if (state.isCertificateEnrollError) {
- E2EIErrorNoSnoozeDialog(
+ E2EIEnrollmentErrorWithDismissDialog(
isE2EILoading = state.isLoading,
- updateCertificate = {
- dismissErrorDialog()
- enrollE2EICertificate()
- }
+ onClick = enrollE2EICertificate,
+ onDismiss = dismissErrorDialog
)
}
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 114486d4041..1d5206ceed3 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
@@ -195,14 +195,46 @@ fun E2EISuccessDialog(
}
@Composable
-fun E2EIErrorWithDismissDialog(
+fun E2EIUpdateErrorWithDismissDialog(
isE2EILoading: Boolean,
updateCertificate: () -> Unit,
onDismiss: () -> Unit
) {
- WireDialog(
+ E2EIErrorWithDismissDialog(
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),
+ isE2EILoading = isE2EILoading,
+ updateCertificate = updateCertificate,
+ onDismiss = onDismiss
+ )
+}
+
+@Composable
+fun E2EIEnrollmentErrorWithDismissDialog(
+ isE2EILoading: Boolean,
+ onClick: () -> Unit,
+ onDismiss: () -> Unit
+) {
+ E2EIErrorWithDismissDialog(
+ title = stringResource(id = R.string.end_to_end_identity_enrollment_error_dialog_title),
+ text = stringResource(id = R.string.end_to_end_identity_enrollment_error_dialog_text),
+ isE2EILoading = isE2EILoading,
+ updateCertificate = onClick,
+ onDismiss = onDismiss
+ )
+}
+
+@Composable
+private fun E2EIErrorWithDismissDialog(
+ title: String,
+ text: String,
+ isE2EILoading: Boolean,
+ updateCertificate: () -> Unit,
+ onDismiss: () -> Unit
+) {
+ WireDialog(
+ title = title,
+ text = text,
onDismiss = onDismiss,
optionButton1Properties = WireDialogButtonProperties(
onClick = updateCertificate,
@@ -247,7 +279,7 @@ private fun E2EIErrorWithSnoozeDialog(
}
@Composable
-fun E2EIErrorNoSnoozeDialog(
+private fun E2EIErrorNoSnoozeDialog(
isE2EILoading: Boolean,
updateCertificate: () -> Unit
) {
diff --git a/app/src/main/kotlin/com/wire/android/ui/settings/devices/DeviceDetailsScreen.kt b/app/src/main/kotlin/com/wire/android/ui/settings/devices/DeviceDetailsScreen.kt
index 31f87c3dd7c..029a283e75a 100644
--- a/app/src/main/kotlin/com/wire/android/ui/settings/devices/DeviceDetailsScreen.kt
+++ b/app/src/main/kotlin/com/wire/android/ui/settings/devices/DeviceDetailsScreen.kt
@@ -75,8 +75,8 @@ import com.wire.android.ui.common.topappbar.WireCenterAlignedTopAppBar
import com.wire.android.ui.common.topappbar.WireTopAppBarTitle
import com.wire.android.ui.destinations.E2eiCertificateDetailsScreenDestination
import com.wire.android.ui.e2eiEnrollment.GetE2EICertificateUI
-import com.wire.android.ui.home.E2EIErrorWithDismissDialog
import com.wire.android.ui.home.E2EISuccessDialog
+import com.wire.android.ui.home.E2EIUpdateErrorWithDismissDialog
import com.wire.android.ui.home.conversationslist.common.FolderHeader
import com.wire.android.ui.settings.devices.model.DeviceDetailsState
import com.wire.android.ui.theme.wireColorScheme
@@ -279,7 +279,7 @@ fun DeviceDetailsContent(
}
if (state.isE2EICertificateEnrollError) {
- E2EIErrorWithDismissDialog(
+ E2EIUpdateErrorWithDismissDialog(
isE2EILoading = state.isLoadingCertificate,
updateCertificate = { enrollE2eiCertificate() },
onDismiss = onEnrollE2EIErrorDismiss
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index e8a34522376..38fc7874608 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1287,6 +1287,8 @@
Certificate updated
The certificate is updated and your device is verified.
Certificate Details
+ Certificate couldn’t be issued.
+ Please try again, or reach out to your team admin.
Certificate Details
End-to-end certificate revoked
Log out to reduce security risks. Then log in again, get a new certificate, and reset your password.\n\nIf you keep using this device, your conversations are no longer verified.