diff --git a/app/src/androidTest/java/protect/card_locker/ComposeAboutActivityTest.kt b/app/src/androidTest/java/protect/card_locker/ComposeAboutActivityTest.kt index 261d854a1..f27672022 100644 --- a/app/src/androidTest/java/protect/card_locker/ComposeAboutActivityTest.kt +++ b/app/src/androidTest/java/protect/card_locker/ComposeAboutActivityTest.kt @@ -16,12 +16,7 @@ class ComposeAboutActivityTest { @Test fun testPasses(): Unit = with(rule) { setContent { - AboutScreenContent( - content = AboutContent(LocalContext.current), - showDonate = true, - showRateOnGooglePlay = false, - onBackPressedDispatcher = null - ) + AboutScreenContent(AboutContent(LocalContext.current)) } onNodeWithTag("topbar_catima").assertIsDisplayed() @@ -30,12 +25,7 @@ class ComposeAboutActivityTest { @Test fun testFails(): Unit = with(rule) { setContent { - AboutScreenContent( - content = AboutContent(LocalContext.current), - showDonate = true, - showRateOnGooglePlay = false, - onBackPressedDispatcher = null - ) + AboutScreenContent(AboutContent(LocalContext.current)) } onNodeWithTag("topbar_catima").assertIsNotDisplayed() diff --git a/app/src/main/java/protect/card_locker/AboutActivity.kt b/app/src/main/java/protect/card_locker/AboutActivity.kt index c9a955d96..b08d971df 100644 --- a/app/src/main/java/protect/card_locker/AboutActivity.kt +++ b/app/src/main/java/protect/card_locker/AboutActivity.kt @@ -54,9 +54,9 @@ class AboutActivity : ComponentActivity() { @Composable fun AboutScreenContent( content: AboutContent, - showDonate: Boolean, - showRateOnGooglePlay: Boolean, - onBackPressedDispatcher: OnBackPressedDispatcher?, + showDonate: Boolean = true, + showRateOnGooglePlay: Boolean = true, + onBackPressedDispatcher: OnBackPressedDispatcher? = null, ) { CatimaTheme { Scaffold( @@ -166,10 +166,5 @@ fun AboutScreenContent( @Preview @Composable fun AboutActivityPreview() { - AboutScreenContent( - content = AboutContent(LocalContext.current), - showDonate = true, - showRateOnGooglePlay = true, - onBackPressedDispatcher = null - ) + AboutScreenContent(AboutContent(LocalContext.current)) }