Updated on 2026-08-14
This commit is contained in:
parent
17add53bc0
commit
304e6d0c5c
6 changed files with 41 additions and 27 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue