Test higher level.

This commit is contained in:
Benoit Marty 2023-02-14 15:17:41 +01:00 committed by Benoit Marty
parent aec6c4f8f0
commit 077897a874

View file

@ -41,7 +41,6 @@ fun CrashDetectionView(
if (state.crashDetected) { if (state.crashDetected) {
CrashDetectionContent( CrashDetectionContent(
state,
onYesClicked = onOpenBugReport, onYesClicked = onOpenBugReport,
onNoClicked = ::onPopupDismissed, onNoClicked = ::onPopupDismissed,
onDismiss = ::onPopupDismissed, onDismiss = ::onPopupDismissed,
@ -51,7 +50,6 @@ fun CrashDetectionView(
@Composable @Composable
fun CrashDetectionContent( fun CrashDetectionContent(
state: CrashDetectionState,
onNoClicked: () -> Unit = { }, onNoClicked: () -> Unit = { },
onYesClicked: () -> Unit = { }, onYesClicked: () -> Unit = { },
onDismiss: () -> Unit = { }, onDismiss: () -> Unit = { },
@ -69,15 +67,15 @@ fun CrashDetectionContent(
@Preview @Preview
@Composable @Composable
internal fun CrashDetectionContentLightPreview() = ElementPreviewLight { ContentToPreview() } internal fun CrashDetectionViewLightPreview() = ElementPreviewLight { ContentToPreview() }
@Preview @Preview
@Composable @Composable
internal fun CrashDetectionContentDarkPreview() = ElementPreviewDark { ContentToPreview() } internal fun CrashDetectionViewDarkPreview() = ElementPreviewDark { ContentToPreview() }
@Composable @Composable
private fun ContentToPreview() { private fun ContentToPreview() {
CrashDetectionContent( CrashDetectionView(
state = aCrashDetectionState() state = aCrashDetectionState().copy(crashDetected = true)
) )
} }