pull/600/head
mike a 2 years ago committed by mergify[bot]
parent 090060f486
commit 7204aa5081

@ -515,7 +515,7 @@ class DefaultSessionControlController(
) { ) {
navController.nav( navController.nav(
R.id.homeFragment, R.id.homeFragment,
HomeFragmentDirections.actionGlobalWallpaperOnboardingDialog() HomeFragmentDirections.actionGlobalWallpaperOnboardingDialog(),
) )
return true return true
} }

@ -218,9 +218,9 @@ class SessionControlView(
if (!featureRecommended && !context.settings().showHomeOnboardingDialog) { if (!featureRecommended && !context.settings().showHomeOnboardingDialog) {
if (!context.settings().showHomeOnboardingDialog && ( if (!context.settings().showHomeOnboardingDialog && (
context.settings().showSyncCFR || context.settings().showSyncCFR ||
context.settings().shouldShowJumpBackInCFR context.settings().shouldShowJumpBackInCFR
) )
) { ) {
featureRecommended = HomeCFRPresenter( featureRecommended = HomeCFRPresenter(
context = context, context = context,
@ -233,7 +233,7 @@ class SessionControlView(
!featureRecommended !featureRecommended
) { ) {
featureRecommended = interactor.showWallpapersOnboardingDialog( featureRecommended = interactor.showWallpapersOnboardingDialog(
context.components.appStore.state.wallpaperState context.components.appStore.state.wallpaperState,
) )
} }
} }

@ -59,7 +59,7 @@ class WallpaperOnboardingDialogFragment : BottomSheetDialogFragment() {
override fun onCreateView( override fun onCreateView(
inflater: LayoutInflater, inflater: LayoutInflater,
container: ViewGroup?, container: ViewGroup?,
savedInstanceState: Bundle? savedInstanceState: Bundle?,
): View = ComposeView(requireContext()).apply { ): View = ComposeView(requireContext()).apply {
setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed) setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed)
@ -85,7 +85,7 @@ class WallpaperOnboardingDialogFragment : BottomSheetDialogFragment() {
loadWallpaperResource = { wallpaperUseCases.loadThumbnail(it) }, loadWallpaperResource = { wallpaperUseCases.loadThumbnail(it) },
onSelectWallpaper = { onSelectWallpaper = {
coroutineScope.launch { wallpaperUseCases.selectWallpaper(it) } coroutineScope.launch { wallpaperUseCases.selectWallpaper(it) }
} },
) )
} }
} }

@ -7,7 +7,6 @@ package org.mozilla.fenix.settings.wallpaper
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.graphics.Bitmap import android.graphics.Bitmap
import androidx.compose.foundation.BorderStroke import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.Image import androidx.compose.foundation.Image
import androidx.compose.foundation.border import androidx.compose.foundation.border
import androidx.compose.foundation.clickable import androidx.compose.foundation.clickable

@ -57,11 +57,11 @@ fun WallpaperOnboarding(
) { ) {
Surface( Surface(
color = FirefoxTheme.colors.layer2, color = FirefoxTheme.colors.layer2,
shape = RoundedCornerShape(topStart = 16.dp, topEnd = 16.dp) shape = RoundedCornerShape(topStart = 16.dp, topEnd = 16.dp),
) { ) {
Column( Column(
modifier = Modifier.padding(16.dp), modifier = Modifier.padding(16.dp),
horizontalAlignment = Alignment.CenterHorizontally horizontalAlignment = Alignment.CenterHorizontally,
) { ) {
Icon( Icon(
painter = painterResource(id = R.drawable.mozac_ic_close), painter = painterResource(id = R.drawable.mozac_ic_close),
@ -70,7 +70,7 @@ fun WallpaperOnboarding(
modifier = Modifier modifier = Modifier
.clickable { onCloseClicked() } .clickable { onCloseClicked() }
.size(24.dp) .size(24.dp)
.align(Alignment.End) .align(Alignment.End),
) )
Spacer(modifier = Modifier.height(8.dp)) Spacer(modifier = Modifier.height(8.dp))
@ -100,14 +100,14 @@ fun WallpaperOnboarding(
selectedWallpaper = currentWallpaper, selectedWallpaper = currentWallpaper,
onSelectWallpaper = { onSelectWallpaper(it) }, onSelectWallpaper = { onSelectWallpaper(it) },
verticalPadding = 16, verticalPadding = 16,
horizontalPadding = 0 horizontalPadding = 0,
) )
TextButton( TextButton(
modifier = Modifier modifier = Modifier
.align(Alignment.CenterHorizontally) .align(Alignment.CenterHorizontally)
.fillMaxWidth(), .fillMaxWidth(),
onClick = { onBottomButtonClicked() } onClick = { onBottomButtonClicked() },
) { ) {
Text( Text(
text = stringResource(R.string.wallpapers_onboarding_dialog_explore_more_button_text), text = stringResource(R.string.wallpapers_onboarding_dialog_explore_more_button_text),
@ -135,7 +135,7 @@ private fun WallpaperSnackbarPreview() {
onCloseClicked = {}, onCloseClicked = {},
onBottomButtonClicked = {}, onBottomButtonClicked = {},
loadWallpaperResource = { null }, loadWallpaperResource = { null },
onSelectWallpaper = {} onSelectWallpaper = {},
) )
} }
} }

Loading…
Cancel
Save