Updated on 2026-08-14

This commit is contained in:
Tangem 2025-06-10 15:29:52 +05:00
commit 69fec5dc58
2 changed files with 30 additions and 13 deletions

View file

@ -2,8 +2,7 @@ package com.tangem.feature.tester.presentation.testpush.ui
import androidx.compose.foundation.clickable
import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.material3.Text
@ -29,8 +28,12 @@ internal fun TestPushDeeplinkBottomSheet(config: TangemBottomSheetConfig?) {
@Composable
private fun TestPushMenuDeepLinkBottomSheetContent(config: TangemBottomSheetConfig) {
TangemBottomSheet<TestPushMenuConfigUM>(config) { content ->
LazyColumn {
TangemBottomSheet<TestPushMenuConfigUM>(config = config, addBottomInsets = false) { content ->
LazyColumn(
modifier = Modifier
.navigationBarsPadding()
.imePadding(),
) {
items(
items = content.itemList.toList(),
key = { it },
@ -56,8 +59,13 @@ private fun TestPushMenuDeepLinkBottomSheetContent(config: TangemBottomSheetConf
@Composable
private fun TestPushMarketsTokenBottomSheetContent(config: TangemBottomSheetConfig) {
TangemBottomSheet<TestPushMarketsTokenConfigUM>(config) { content ->
LazyColumn {
TangemBottomSheet<TestPushMarketsTokenConfigUM>(config = config, addBottomInsets = false) { content ->
LazyColumn(
modifier = Modifier
.fillMaxSize()
.navigationBarsPadding()
.imePadding(),
) {
item(key = "Markets Search") {
OutlineTextField(
label = "Title",

View file

@ -15,16 +15,25 @@ internal class TestPushMarketTokenBottomSheetTransformer(
private val onItemClick: (TokenMarket) -> Unit,
) : Transformer<TestPushUM> {
override fun transform(prevState: TestPushUM): TestPushUM {
val content = (prevState.bottomSheetConfig?.content as? TestPushMarketsTokenConfigUM)?.copy(
itemList = item,
onSearchValueEdit = onSearchEdit,
onItemClick = onItemClick,
) ?: TestPushMarketsTokenConfigUM(
itemList = item,
searchValue = TextFieldValue(""),
onSearchValueEdit = onSearchEdit,
onItemClick = onItemClick,
)
return prevState.copy(
bottomSheetConfig = TangemBottomSheetConfig(
bottomSheetConfig = prevState.bottomSheetConfig?.let {
prevState.bottomSheetConfig.copy(
content = content,
)
} ?: TangemBottomSheetConfig(
isShown = true,
onDismissRequest = onDismissBottomSheet,
content = TestPushMarketsTokenConfigUM(
itemList = item,
searchValue = TextFieldValue(""),
onSearchValueEdit = onSearchEdit,
onItemClick = onItemClick,
),
content = content,
),
)
}