Updated on 2026-08-14
This commit is contained in:
parent
a9916d2702
commit
fb08f7c4e1
2 changed files with 166 additions and 145 deletions
|
|
@ -45,14 +45,15 @@ import com.tangem.feature.tokendetails.presentation.tokendetails.state.*
|
|||
import com.tangem.feature.tokendetails.presentation.tokendetails.state.TokenDetailsTopAppBarUM.TitleState
|
||||
import com.tangem.feature.tokendetails.presentation.tokendetails.ui.components.TokenDetailsBalanceBlock
|
||||
import com.tangem.feature.tokendetails.presentation.tokendetails.ui.components.ZeroBalanceActionsBlock
|
||||
import com.tangem.features.markets.token.block.TokenMarketBlockComponent
|
||||
import com.tangem.features.marketing.api.MarketingBannerComponent
|
||||
import com.tangem.features.markets.token.block.TokenMarketBlockComponent
|
||||
import com.tangem.features.rating.RatingComponent
|
||||
import com.tangem.features.tokendetails.ExpressTransactionsComponent
|
||||
import com.tangem.features.txhistory.component.TxHistoryComponent
|
||||
import com.tangem.features.txhistory.entity.TxHistoryItemsUM
|
||||
import com.tangem.features.txhistory.entity.TxHistoryUM
|
||||
import com.tangem.features.yield.supply.api.YieldSupplyComponent
|
||||
import dev.chrisbanes.haze.HazeState
|
||||
import dev.chrisbanes.haze.rememberHazeState
|
||||
import kotlinx.collections.immutable.PersistentList
|
||||
import kotlinx.collections.immutable.persistentListOf
|
||||
|
|
@ -81,6 +82,7 @@ internal fun TokenDetailsScreen(
|
|||
val statusBarHeight = with(LocalDensity.current) { WindowInsets.systemBars.getTop(this).toDp() }
|
||||
val topBarTotalHeight = TopBarHeight + statusBarHeight
|
||||
val hazeState = rememberHazeState()
|
||||
val buttonsHazeState = rememberHazeState()
|
||||
|
||||
val rootBackground = TangemTheme.colors2.surface.level2
|
||||
var marketBlockHeight by remember { mutableStateOf(0.dp) }
|
||||
|
|
@ -92,6 +94,13 @@ internal fun TokenDetailsScreen(
|
|||
.fillMaxSize()
|
||||
.background(rootBackground),
|
||||
) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.background(rootBackground)
|
||||
.hazeSourceTangem(state = buttonsHazeState, zIndex = -1f),
|
||||
)
|
||||
|
||||
TangemPullToRefreshSlidingContainer(
|
||||
config = tokenDetailsUM.pullToRefreshConfig,
|
||||
indicatorOffset = topBarTotalHeight,
|
||||
|
|
@ -104,6 +113,7 @@ internal fun TokenDetailsScreen(
|
|||
expressTransactionsToDisplay = expressState.transactionsToDisplay,
|
||||
marketingBannerComponent = marketingBannerComponent,
|
||||
rootBackground = rootBackground,
|
||||
buttonsHazeState = buttonsHazeState,
|
||||
topContentPadding = topBarTotalHeight,
|
||||
bottomContentPadding = effectiveBottomPadding,
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
|
|
@ -166,6 +176,7 @@ private fun TokenDetailsBody(
|
|||
expressTransactionsToDisplay: PersistentList<ExpressTransactionStateUM>,
|
||||
marketingBannerComponent: MarketingBannerComponent,
|
||||
rootBackground: Color,
|
||||
buttonsHazeState: HazeState,
|
||||
topContentPadding: Dp,
|
||||
bottomContentPadding: Dp,
|
||||
modifier: Modifier = Modifier,
|
||||
|
|
@ -194,11 +205,13 @@ private fun TokenDetailsBody(
|
|||
contentPadding = PaddingValues(top = topContentPadding, bottom = bottomContentPadding),
|
||||
) {
|
||||
item(key = "balance_block") {
|
||||
TokenDetailsBalanceBlock(
|
||||
balanceBlockUM = tokenDetailsUM.balanceBlockUM,
|
||||
isBalanceHidden = tokenDetailsUM.isBalanceHidden,
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
)
|
||||
CompositionLocalProvider(LocalHazeState provides buttonsHazeState) {
|
||||
TokenDetailsBalanceBlock(
|
||||
balanceBlockUM = tokenDetailsUM.balanceBlockUM,
|
||||
isBalanceHidden = tokenDetailsUM.isBalanceHidden,
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
)
|
||||
}
|
||||
}
|
||||
val balance = tokenDetailsUM.balanceBlockUM
|
||||
notifications(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue