Skip to content

Commit

Permalink
[1.231.*] Pre-release merge (#719)
Browse files Browse the repository at this point in the history
  • Loading branch information
tramline-github[bot] authored Aug 20, 2024
2 parents 8c7f378 + 71e37f8 commit c1b02c5
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ internal fun FeaturedSection(
systemBarsEndPadding
}

val defaultSeedColor = AppTheme.colorScheme.tintedForeground

LaunchedEffect(pagerState, featuredPosts) {
snapshotFlow {
val settledPage = pagerState.settledPage
Expand Down Expand Up @@ -148,9 +150,14 @@ internal fun FeaturedSection(
currentItem
}

val fromSeedColor =
fromItem.seedColor.run { if (this != null) Color(this) else defaultSeedColor }
val toSeedColor =
toItem.seedColor.run { if (this != null) Color(this) else defaultSeedColor }

dynamicColorState.animate(
fromSeedColor = Color(fromItem.seedColor!!),
toSeedColor = Color(toItem.seedColor!!),
fromSeedColor = fromSeedColor,
toSeedColor = toSeedColor,
progress = offset
)
}
Expand Down

0 comments on commit c1b02c5

Please sign in to comment.