Browse Source

Test higher level.

jme/20-permission-management
Benoit Marty 2 years ago committed by Benoit Marty
parent
commit
3f44b895fc
  1. 10
      features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/ui/CrashDetectionScreen.kt

10
features/rageshake/src/main/kotlin/io/element/android/features/rageshake/crash/ui/CrashDetectionScreen.kt

@ -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)
) )
} }

Loading…
Cancel
Save