Skip to content

Commit

Permalink
Listen to current page changes when updating dynamic content theme
Browse files Browse the repository at this point in the history
  • Loading branch information
msasikanth committed Oct 5, 2023
1 parent ec89271 commit f0ee6a6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ internal fun FeaturedSection(
val dynamicColorState = LocalDynamicColorState.current

LaunchedEffect(pagerState, featuredPosts) {
snapshotFlow { pagerState.settledPage }
snapshotFlow { pagerState.currentPage }
.collectLatest { index ->
val selectedFeaturedPost = featuredPosts.getOrNull(index)
selectedFeaturedPost?.imageUrl?.let { url ->
Expand Down

0 comments on commit f0ee6a6

Please sign in to comment.