From 077897a874e66e5a0a2d6c0bbc4ed4561e8885ef Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 14 Feb 2023 15:17:41 +0100 Subject: [PATCH] Test higher level. --- .../rageshake/crash/ui/CrashDetectionScreen.kt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/ui/CrashDetectionScreen.kt b/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/ui/CrashDetectionScreen.kt index a5c7900fb6..50d6488697 100644 --- a/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/ui/CrashDetectionScreen.kt +++ b/features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/ui/CrashDetectionScreen.kt @@ -41,7 +41,6 @@ fun CrashDetectionView( if (state.crashDetected) { CrashDetectionContent( - state, onYesClicked = onOpenBugReport, onNoClicked = ::onPopupDismissed, onDismiss = ::onPopupDismissed, @@ -51,7 +50,6 @@ fun CrashDetectionView( @Composable fun CrashDetectionContent( - state: CrashDetectionState, onNoClicked: () -> Unit = { }, onYesClicked: () -> Unit = { }, onDismiss: () -> Unit = { }, @@ -69,15 +67,15 @@ fun CrashDetectionContent( @Preview @Composable -internal fun CrashDetectionContentLightPreview() = ElementPreviewLight { ContentToPreview() } +internal fun CrashDetectionViewLightPreview() = ElementPreviewLight { ContentToPreview() } @Preview @Composable -internal fun CrashDetectionContentDarkPreview() = ElementPreviewDark { ContentToPreview() } +internal fun CrashDetectionViewDarkPreview() = ElementPreviewDark { ContentToPreview() } @Composable private fun ContentToPreview() { - CrashDetectionContent( - state = aCrashDetectionState() + CrashDetectionView( + state = aCrashDetectionState().copy(crashDetected = true) ) }