|
|
@ -53,16 +53,19 @@ fun HomeSectionHeader(
|
|
|
|
val wallpaperState = components.appStore
|
|
|
|
val wallpaperState = components.appStore
|
|
|
|
.observeAsComposableState { state -> state.wallpaperState }.value
|
|
|
|
.observeAsComposableState { state -> state.wallpaperState }.value
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
val wallpaperAdaptedTextColor = wallpaperState?.currentWallpaper?.textColor?.let { Color(it) }
|
|
|
|
|
|
|
|
|
|
|
|
val isWallpaperDefault =
|
|
|
|
val isWallpaperDefault =
|
|
|
|
(wallpaperState?.currentWallpaper ?: Wallpaper.Default) == Wallpaper.Default
|
|
|
|
(wallpaperState?.currentWallpaper ?: Wallpaper.Default) == Wallpaper.Default
|
|
|
|
|
|
|
|
|
|
|
|
HomeSectionHeaderContent(
|
|
|
|
HomeSectionHeaderContent(
|
|
|
|
headerText = headerText,
|
|
|
|
headerText = headerText,
|
|
|
|
|
|
|
|
textColor = wallpaperAdaptedTextColor ?: FirefoxTheme.colors.textPrimary,
|
|
|
|
description = description,
|
|
|
|
description = description,
|
|
|
|
showAllTextColor = if (isWallpaperDefault) {
|
|
|
|
showAllTextColor = if (isWallpaperDefault) {
|
|
|
|
FirefoxTheme.colors.textAccent
|
|
|
|
FirefoxTheme.colors.textAccent
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
FirefoxTheme.colors.textPrimary
|
|
|
|
wallpaperAdaptedTextColor ?: FirefoxTheme.colors.textAccent
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onShowAllClick = onShowAllClick,
|
|
|
|
onShowAllClick = onShowAllClick,
|
|
|
|
)
|
|
|
|
)
|
|
|
@ -80,6 +83,7 @@ fun HomeSectionHeader(
|
|
|
|
@Composable
|
|
|
|
@Composable
|
|
|
|
private fun HomeSectionHeaderContent(
|
|
|
|
private fun HomeSectionHeaderContent(
|
|
|
|
headerText: String,
|
|
|
|
headerText: String,
|
|
|
|
|
|
|
|
textColor: Color = FirefoxTheme.colors.textPrimary,
|
|
|
|
description: String = "",
|
|
|
|
description: String = "",
|
|
|
|
showAllTextColor: Color = FirefoxTheme.colors.textAccent,
|
|
|
|
showAllTextColor: Color = FirefoxTheme.colors.textAccent,
|
|
|
|
onShowAllClick: (() -> Unit)? = null,
|
|
|
|
onShowAllClick: (() -> Unit)? = null,
|
|
|
@ -89,6 +93,7 @@ private fun HomeSectionHeaderContent(
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
SectionHeader(
|
|
|
|
SectionHeader(
|
|
|
|
text = headerText,
|
|
|
|
text = headerText,
|
|
|
|
|
|
|
|
textColor = textColor,
|
|
|
|
modifier = Modifier
|
|
|
|
modifier = Modifier
|
|
|
|
.weight(1f)
|
|
|
|
.weight(1f)
|
|
|
|
.wrapContentHeight(align = Alignment.Top)
|
|
|
|
.wrapContentHeight(align = Alignment.Top)
|
|
|
|