From f0ee6a6c449da96bd1d462cf237fcb17105cbea4 Mon Sep 17 00:00:00 2001 From: Sasikanth Miriyampalli Date: Thu, 5 Oct 2023 08:04:30 +0530 Subject: [PATCH] Listen to current page changes when updating dynamic content theme --- .../kotlin/dev/sasikanth/rss/reader/home/ui/FeaturedSection.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/FeaturedSection.kt b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/FeaturedSection.kt index b2a769cf7..0cf7e8739 100644 --- a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/FeaturedSection.kt +++ b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/FeaturedSection.kt @@ -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 ->