Updated on 2026-08-14
This commit is contained in:
parent
95b56b454f
commit
2de92a1101
1 changed files with 29 additions and 28 deletions
|
|
@ -96,17 +96,16 @@ fun TangemTopNavigation(
|
|||
end = 16.dp,
|
||||
),
|
||||
content = {
|
||||
// Each optional slot caches its last non-null content so the spring exit transition
|
||||
// still has something to render after the caller flips it back to `null`.
|
||||
val displayedStart = rememberLastNonNull(startButton)
|
||||
Box(modifier = Modifier.layoutId(SlotId.Start)) {
|
||||
AnimatedVisibility(
|
||||
modifier = Modifier.layoutId(SlotId.Start),
|
||||
visible = startButton != null,
|
||||
enter = slotEnter,
|
||||
exit = slotExit,
|
||||
) {
|
||||
displayedStart?.invoke()
|
||||
}
|
||||
}
|
||||
|
||||
Column(
|
||||
modifier = Modifier
|
||||
|
|
@ -121,8 +120,8 @@ fun TangemTopNavigation(
|
|||
}
|
||||
|
||||
val displayedGroup = rememberLastNonNull(endButtonsGroup)
|
||||
Box(modifier = Modifier.layoutId(SlotId.Group)) {
|
||||
AnimatedVisibility(
|
||||
modifier = Modifier.layoutId(SlotId.Group),
|
||||
visible = endButtonsGroup != null,
|
||||
enter = slotEnter,
|
||||
exit = slotExit,
|
||||
|
|
@ -136,16 +135,18 @@ fun TangemTopNavigation(
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val displayedEnd = rememberLastNonNull(endButton)
|
||||
Box(modifier = Modifier.layoutId(SlotId.End)) {
|
||||
AnimatedVisibility(
|
||||
modifier = Modifier.layoutId(SlotId.End),
|
||||
visible = endButton != null,
|
||||
enter = slotEnter,
|
||||
exit = slotExit,
|
||||
) {
|
||||
displayedEnd?.invoke()
|
||||
}
|
||||
}
|
||||
},
|
||||
) { measurables, constraints ->
|
||||
val groupSpacingPx = groupSpacing.roundToPx()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue