2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-11 13:11:01 +00:00

Merge pull request #3721 from mozilla-mobile/mergify/bp/releases_v118/pr-3702

This commit is contained in:
Pascal Chevrel 2023-09-29 16:23:24 +02:00 committed by GitHub
commit 17e5d208b3
2 changed files with 4 additions and 6 deletions

View File

@ -157,6 +157,10 @@ class JunoOnboardingFragment : Fragment() {
) )
}, },
onAddFirefoxWidgetClick = { onAddFirefoxWidgetClick = {
telemetryRecorder.onAddSearchWidgetClick(
pagesToDisplay.telemetrySequenceId(),
pagesToDisplay.sequencePosition(OnboardingPageUiData.Type.ADD_SEARCH_WIDGET),
)
showAddSearchWidgetDialog() showAddSearchWidgetDialog()
}, },
onSkipFirefoxWidgetClick = { onSkipFirefoxWidgetClick = {

View File

@ -39,7 +39,6 @@ import org.mozilla.fenix.R
import org.mozilla.fenix.components.components import org.mozilla.fenix.components.components
import org.mozilla.fenix.compose.PagerIndicator import org.mozilla.fenix.compose.PagerIndicator
import org.mozilla.fenix.compose.annotation.LightDarkPreview import org.mozilla.fenix.compose.annotation.LightDarkPreview
import org.mozilla.fenix.onboarding.JunoOnboardingTelemetryRecorder
import org.mozilla.fenix.onboarding.WidgetPinnedReceiver.WidgetPinnedState import org.mozilla.fenix.onboarding.WidgetPinnedReceiver.WidgetPinnedState
import org.mozilla.fenix.theme.FirefoxTheme import org.mozilla.fenix.theme.FirefoxTheme
@ -80,7 +79,6 @@ fun JunoOnboardingScreen(
val pagerState = rememberPagerState() val pagerState = rememberPagerState()
val isSignedIn: State<Boolean?> = components.backgroundServices.syncStore val isSignedIn: State<Boolean?> = components.backgroundServices.syncStore
.observeAsComposableState { it.account != null } .observeAsComposableState { it.account != null }
val telemetryRecorder by lazy { JunoOnboardingTelemetryRecorder() }
val widgetPinnedFlow: StateFlow<Boolean> = WidgetPinnedState.isPinned val widgetPinnedFlow: StateFlow<Boolean> = WidgetPinnedState.isPinned
val isWidgetPinnedState by widgetPinnedFlow.collectAsState() val isWidgetPinnedState by widgetPinnedFlow.collectAsState()
@ -115,10 +113,6 @@ fun JunoOnboardingScreen(
LaunchedEffect(isWidgetPinnedState) { LaunchedEffect(isWidgetPinnedState) {
if (isWidgetPinnedState) { if (isWidgetPinnedState) {
scrollToNextPageOrDismiss() scrollToNextPageOrDismiss()
telemetryRecorder.onAddSearchWidgetClick(
pagesToDisplay.telemetrySequenceId(),
pagesToDisplay.sequencePosition(OnboardingPageUiData.Type.ADD_SEARCH_WIDGET),
)
} }
} }