From 3c21ed9d32c436f4f5db32ab0098f6ea57cc1f76 Mon Sep 17 00:00:00 2001 From: Boris Safonov Date: Tue, 14 May 2024 17:43:21 +0300 Subject: [PATCH] fix: GetE2EICertificate button when no certificate --- .../wire/android/ui/settings/devices/DeviceDetailsScreen.kt | 2 +- .../ui/settings/devices/EndToEndIdentityCertificateItem.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 2cdb86be34f..7f0cd3a8c02 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 @@ -194,7 +194,7 @@ fun DeviceDetailsContent( } } - if (state.isE2EIEnabled && state.e2eiCertificate != null) { + if (state.isE2EIEnabled) { item { EndToEndIdentityCertificateItem( isE2eiCertificateActivated = state.isE2eiCertificateActivated, diff --git a/app/src/main/kotlin/com/wire/android/ui/settings/devices/EndToEndIdentityCertificateItem.kt b/app/src/main/kotlin/com/wire/android/ui/settings/devices/EndToEndIdentityCertificateItem.kt index 30a3969d952..d21dd51ceae 100644 --- a/app/src/main/kotlin/com/wire/android/ui/settings/devices/EndToEndIdentityCertificateItem.kt +++ b/app/src/main/kotlin/com/wire/android/ui/settings/devices/EndToEndIdentityCertificateItem.kt @@ -47,7 +47,7 @@ import kotlinx.datetime.Instant @Composable fun EndToEndIdentityCertificateItem( isE2eiCertificateActivated: Boolean, - certificate: E2eiCertificate, + certificate: E2eiCertificate?, isCurrentDevice: Boolean, isLoadingCertificate: Boolean, enrollE2eiCertificate: () -> Unit, @@ -77,7 +77,7 @@ fun EndToEndIdentityCertificateItem( color = MaterialTheme.wireColorScheme.secondaryText, ) Column { - if (isE2eiCertificateActivated) { + if (isE2eiCertificateActivated && certificate != null) { when (certificate.status) { CertificateStatus.REVOKED -> { E2EIStatusRow(