Updated on 2026-08-14
This commit is contained in:
commit
69fec5dc58
2 changed files with 30 additions and 13 deletions
|
|
@ -2,8 +2,7 @@ package com.tangem.feature.tester.presentation.testpush.ui
|
||||||
|
|
||||||
import androidx.compose.foundation.clickable
|
import androidx.compose.foundation.clickable
|
||||||
import androidx.compose.foundation.interaction.MutableInteractionSource
|
import androidx.compose.foundation.interaction.MutableInteractionSource
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.*
|
||||||
import androidx.compose.foundation.layout.padding
|
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.items
|
import androidx.compose.foundation.lazy.items
|
||||||
import androidx.compose.material3.Text
|
import androidx.compose.material3.Text
|
||||||
|
|
@ -29,8 +28,12 @@ internal fun TestPushDeeplinkBottomSheet(config: TangemBottomSheetConfig?) {
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
private fun TestPushMenuDeepLinkBottomSheetContent(config: TangemBottomSheetConfig) {
|
private fun TestPushMenuDeepLinkBottomSheetContent(config: TangemBottomSheetConfig) {
|
||||||
TangemBottomSheet<TestPushMenuConfigUM>(config) { content ->
|
TangemBottomSheet<TestPushMenuConfigUM>(config = config, addBottomInsets = false) { content ->
|
||||||
LazyColumn {
|
LazyColumn(
|
||||||
|
modifier = Modifier
|
||||||
|
.navigationBarsPadding()
|
||||||
|
.imePadding(),
|
||||||
|
) {
|
||||||
items(
|
items(
|
||||||
items = content.itemList.toList(),
|
items = content.itemList.toList(),
|
||||||
key = { it },
|
key = { it },
|
||||||
|
|
@ -56,8 +59,13 @@ private fun TestPushMenuDeepLinkBottomSheetContent(config: TangemBottomSheetConf
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
private fun TestPushMarketsTokenBottomSheetContent(config: TangemBottomSheetConfig) {
|
private fun TestPushMarketsTokenBottomSheetContent(config: TangemBottomSheetConfig) {
|
||||||
TangemBottomSheet<TestPushMarketsTokenConfigUM>(config) { content ->
|
TangemBottomSheet<TestPushMarketsTokenConfigUM>(config = config, addBottomInsets = false) { content ->
|
||||||
LazyColumn {
|
LazyColumn(
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxSize()
|
||||||
|
.navigationBarsPadding()
|
||||||
|
.imePadding(),
|
||||||
|
) {
|
||||||
item(key = "Markets Search") {
|
item(key = "Markets Search") {
|
||||||
OutlineTextField(
|
OutlineTextField(
|
||||||
label = "Title",
|
label = "Title",
|
||||||
|
|
|
||||||
|
|
@ -15,16 +15,25 @@ internal class TestPushMarketTokenBottomSheetTransformer(
|
||||||
private val onItemClick: (TokenMarket) -> Unit,
|
private val onItemClick: (TokenMarket) -> Unit,
|
||||||
) : Transformer<TestPushUM> {
|
) : Transformer<TestPushUM> {
|
||||||
override fun transform(prevState: TestPushUM): 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(
|
return prevState.copy(
|
||||||
bottomSheetConfig = TangemBottomSheetConfig(
|
bottomSheetConfig = prevState.bottomSheetConfig?.let {
|
||||||
|
prevState.bottomSheetConfig.copy(
|
||||||
|
content = content,
|
||||||
|
)
|
||||||
|
} ?: TangemBottomSheetConfig(
|
||||||
isShown = true,
|
isShown = true,
|
||||||
onDismissRequest = onDismissBottomSheet,
|
onDismissRequest = onDismissBottomSheet,
|
||||||
content = TestPushMarketsTokenConfigUM(
|
content = content,
|
||||||
itemList = item,
|
|
||||||
searchValue = TextFieldValue(""),
|
|
||||||
onSearchValueEdit = onSearchEdit,
|
|
||||||
onItemClick = onItemClick,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue