From 66b2911a9d79481d4ae933d1451a749da2ed0c97 Mon Sep 17 00:00:00 2001 From: Sasikanth Miriyampalli Date: Sat, 7 Oct 2023 14:35:54 +0530 Subject: [PATCH] Reset dynamic theme if featured posts are not present --- .../kotlin/dev/sasikanth/rss/reader/home/ui/HomeScreen.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/HomeScreen.kt b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/HomeScreen.kt index c274aa2ea..5fd267fc2 100644 --- a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/HomeScreen.kt +++ b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/HomeScreen.kt @@ -252,8 +252,8 @@ private fun HomeScreenContent( val hasContent = featuredPosts.isNotEmpty() || posts.itemCount != 0 val dynamicColorState = LocalDynamicColorState.current - LaunchedEffect(hasContent) { - if (!hasContent) { + LaunchedEffect(featuredPosts) { + if (featuredPosts.isEmpty()) { dynamicColorState.reset() } }