Skip to content

Commit

Permalink
Reset dynamic theme if featured posts are not present
Browse files Browse the repository at this point in the history
  • Loading branch information
msasikanth committed Oct 7, 2023
1 parent d663673 commit 66b2911
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
Expand Down

0 comments on commit 66b2911

Please sign in to comment.