From 16316718afdf28ecfe508e875bfdb5af899533a4 Mon Sep 17 00:00:00 2001 From: rahulsainani Date: Tue, 14 Nov 2023 11:50:35 +0100 Subject: [PATCH] Bug 1863545 - Add rc footer in no analysis state --- .../main/java/org/mozilla/fenix/shopping/ui/NoAnalysis.kt | 7 +++++++ .../fenix/shopping/ui/ReviewQualityCheckBottomSheet.kt | 1 + 2 files changed, 8 insertions(+) diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/shopping/ui/NoAnalysis.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/shopping/ui/NoAnalysis.kt index 78b18e0d0677..c0a3821adba9 100644 --- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/shopping/ui/NoAnalysis.kt +++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/shopping/ui/NoAnalysis.kt @@ -50,6 +50,7 @@ import org.mozilla.fenix.theme.FirefoxTheme * recommendations toggle state. * @param onSettingsExpandToggleClick Invoked when the user expands or collapses the settings card. * @param onInfoExpandToggleClick Invoked when the user expands or collapses the info card. + * @param onFooterLinkClick Invoked when the user clicks on the footer link. * @param modifier Modifier to be applied to the composable. */ @Suppress("LongParameterList") @@ -66,6 +67,7 @@ fun NoAnalysis( onProductRecommendationsEnabledStateChange: (Boolean) -> Unit, onSettingsExpandToggleClick: () -> Unit, onInfoExpandToggleClick: () -> Unit, + onFooterLinkClick: () -> Unit, modifier: Modifier = Modifier, ) { Column( @@ -89,6 +91,10 @@ fun NoAnalysis( onExpandToggleClick = onSettingsExpandToggleClick, modifier = Modifier.fillMaxWidth(), ) + + ReviewQualityCheckFooter( + onLinkClick = onFooterLinkClick, + ) } } @@ -202,6 +208,7 @@ private fun NoAnalysisPreview() { onProductRecommendationsEnabledStateChange = { productRecommendationsEnabled = it }, onSettingsExpandToggleClick = { isSettingsExpanded = !isSettingsExpanded }, onInfoExpandToggleClick = { isInfoExpanded = !isInfoExpanded }, + onFooterLinkClick = {}, modifier = Modifier.fillMaxWidth(), ) } diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/shopping/ui/ReviewQualityCheckBottomSheet.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/shopping/ui/ReviewQualityCheckBottomSheet.kt index 2642f940a46a..fda572a3241a 100644 --- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/shopping/ui/ReviewQualityCheckBottomSheet.kt +++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/shopping/ui/ReviewQualityCheckBottomSheet.kt @@ -207,6 +207,7 @@ private fun ProductReview( onProductRecommendationsEnabledStateChange = onProductRecommendationsEnabledStateChange, onSettingsExpandToggleClick = onSettingsExpandToggleClick, onInfoExpandToggleClick = onInfoExpandToggleClick, + onFooterLinkClick = onFooterLinkClick, modifier = Modifier.fillMaxWidth(), ) }