From 245e7bf1323a765e530a1d63c014affaf8da4372 Mon Sep 17 00:00:00 2001 From: alexandreferris Date: Thu, 11 Apr 2024 12:13:53 +0200 Subject: [PATCH] fix: add correctly created dialogs to each screen Signed-off-by: alexandreferris --- .../android/ui/e2eiEnrollment/E2EIEnrollmentScreen.kt | 10 ++++------ .../android/ui/settings/devices/DeviceDetailsScreen.kt | 4 ++-- 2 files changed, 6 insertions(+), 8 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 7c8c1a9073b..cc11e227b11 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.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 @@ -193,12 +193,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/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