File tree Expand file tree Collapse file tree
desktopApp/src/jvmMain/kotlin/com/prof18/feedflow/desktop/home
sharedUI/src/commonMain/kotlin/com/prof18/feedflow/shared/ui/home/components/list Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -84,7 +84,9 @@ fun DesktopHomeScreenContent(
8484 )
8585 }
8686 }
87- val contentContainerColor = displayState.feedLayout.contentContainerColor()
87+ val contentContainerColor = displayState.feedLayout.contentContainerColor(
88+ hasFeedItems = displayState.feedItems.isNotEmpty(),
89+ )
8890
8991 Scaffold (
9092 modifier = modifier,
@@ -291,8 +293,8 @@ private fun FeedLayout.isCardStyleLayout() = when (this) {
291293}
292294
293295@Composable
294- private fun FeedLayout.contentContainerColor (): Color =
295- if (isCardStyleLayout()) {
296+ private fun FeedLayout.contentContainerColor (hasFeedItems : Boolean ): Color =
297+ if (hasFeedItems && isCardStyleLayout()) {
296298 MaterialTheme .colorScheme.surfaceContainer
297299 } else {
298300 MaterialTheme .colorScheme.surface
Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ fun FeedList(
119119 feedItemDisplaySettings : FeedItemDisplaySettings = FeedItemDisplaySettings (),
120120) {
121121 val itemFeedLayout = feedLayout.normalizeForFeedList()
122- val feedBackgroundModifier = if (itemFeedLayout.usesCardBackground()) {
122+ val feedBackgroundModifier = if (itemFeedLayout.usesCardBackground() && feedItems.isNotEmpty() ) {
123123 Modifier .background(MaterialTheme .colorScheme.surfaceContainer)
124124 } else {
125125 Modifier
You can’t perform that action at this time.
0 commit comments