Test higher level.
This commit is contained in:
parent
aec6c4f8f0
commit
077897a874
1 changed files with 4 additions and 6 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue