Updated on 2026-08-14

This commit is contained in:
Tangem 2026-04-15 11:21:53 +03:00
parent 17add53bc0
commit 304e6d0c5c
6 changed files with 41 additions and 27 deletions

View file

@ -2,6 +2,7 @@ package com.tangem.features.feed.components.feed
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.State
import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
@ -44,6 +45,7 @@ internal class DefaultFeedComponent(
context = child("promoBannersBlockComponent"),
params = PromoBannersBlockComponent.Params(
placeholder = PromoBannersBlockComponent.Placeholder.FEED,
isInitiallyVisibleOnScreen = false,
),
)
}
@ -70,6 +72,11 @@ internal class DefaultFeedComponent(
contentPadding: PaddingValues,
modifier: Modifier,
) {
val isExpanded = bottomSheetState.value == BottomSheetState.EXPANDED
LaunchedEffect(isExpanded) {
promoBannersBlockComponent?.setVisibleOnScreen(isExpanded)
}
LifecycleStartEffect(Unit) {
feedComponentModel.isVisibleOnScreen.value = true
onStopOrDispose {