From 8f2c28715ae670ffe02fa9a4aa450faaf287d66b Mon Sep 17 00:00:00 2001 From: Tangem Date: Mon, 19 Jan 2026 10:20:24 +0100 Subject: [PATCH] Updated on 2026-08-14 --- .../components/feed/DefaultFeedComponent.kt | 5 ++++- .../tangem/features/feed/ui/feed/FeedList.kt | 18 +++++++++++++++--- .../presentation/wallet/ui/WalletScreen.kt | 19 ++++++++++--------- 3 files changed, 29 insertions(+), 13 deletions(-) diff --git a/features/feed/impl/src/main/kotlin/com/tangem/features/feed/components/feed/DefaultFeedComponent.kt b/features/feed/impl/src/main/kotlin/com/tangem/features/feed/components/feed/DefaultFeedComponent.kt index 90ab30cbda..f7073e2ca2 100644 --- a/features/feed/impl/src/main/kotlin/com/tangem/features/feed/components/feed/DefaultFeedComponent.kt +++ b/features/feed/impl/src/main/kotlin/com/tangem/features/feed/components/feed/DefaultFeedComponent.kt @@ -25,7 +25,10 @@ internal class DefaultFeedComponent( @Composable override fun Title(bottomSheetState: State) { val state by feedComponentModel.state.collectAsStateWithLifecycle() - FeedListHeader(state.feedListSearchBar) + FeedListHeader( + isSearchBarClickable = bottomSheetState.value == BottomSheetState.EXPANDED, + feedListSearchBar = state.feedListSearchBar, + ) } @Composable diff --git a/features/feed/impl/src/main/kotlin/com/tangem/features/feed/ui/feed/FeedList.kt b/features/feed/impl/src/main/kotlin/com/tangem/features/feed/ui/feed/FeedList.kt index 5cf729b8ba..92313b9261 100644 --- a/features/feed/impl/src/main/kotlin/com/tangem/features/feed/ui/feed/FeedList.kt +++ b/features/feed/impl/src/main/kotlin/com/tangem/features/feed/ui/feed/FeedList.kt @@ -46,6 +46,7 @@ import com.tangem.core.ui.components.block.TangemBlockCardColors import com.tangem.core.ui.components.buttons.SecondarySmallButton import com.tangem.core.ui.components.buttons.SmallButtonConfig import com.tangem.core.ui.extensions.TextReference +import com.tangem.core.ui.extensions.conditional import com.tangem.core.ui.extensions.resolveReference import com.tangem.core.ui.extensions.stringResourceSafe import com.tangem.core.ui.res.LocalMainBottomSheetColor @@ -56,9 +57,14 @@ import com.tangem.features.feed.ui.feed.preview.FeedListPreviewDataProvider.crea import com.tangem.features.feed.ui.feed.state.* @Composable -internal fun FeedListHeader(feedListSearchBar: FeedListSearchBar, modifier: Modifier = Modifier) { +internal fun FeedListHeader( + isSearchBarClickable: Boolean, + feedListSearchBar: FeedListSearchBar, + modifier: Modifier = Modifier, +) { val background = LocalMainBottomSheetColor.current.value FeedSearchBar( + isSearchBarClickable = isSearchBarClickable, feedListSearchBar = feedListSearchBar, modifier = modifier .drawBehind { drawRect(background) } @@ -102,13 +108,19 @@ internal fun FeedList(state: FeedListUM, modifier: Modifier = Modifier) { } @Composable -private fun FeedSearchBar(feedListSearchBar: FeedListSearchBar, modifier: Modifier = Modifier) { +private fun FeedSearchBar( + isSearchBarClickable: Boolean, + feedListSearchBar: FeedListSearchBar, + modifier: Modifier = Modifier, +) { Row( modifier = modifier .fillMaxWidth() .clip(RoundedCornerShape(36.dp)) .background(color = TangemTheme.colors.field.focused) - .clickable(onClick = feedListSearchBar.onBarClick) + .conditional(condition = isSearchBarClickable) { + clickable(onClick = feedListSearchBar.onBarClick) + } .padding(14.dp), ) { Icon( diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/ui/WalletScreen.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/ui/WalletScreen.kt index 22f5a87af7..803f2d873b 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/ui/WalletScreen.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/ui/WalletScreen.kt @@ -449,20 +449,21 @@ private inline fun BaseScaffoldWithMarkets( } Column( - modifier = Modifier.sizeIn(maxHeight = maxHeight - statusBarHeight), + modifier = Modifier + // expand bottom sheet when clicked on the header + .clickable( + enabled = bottomSheetState.currentValue == TangemSheetValue.PartiallyExpanded, + indication = null, + interactionSource = null, + ) { + coroutineScope.launch { bottomSheetState.expand() } + } + .sizeIn(maxHeight = maxHeight - statusBarHeight), ) { Hand(Modifier.drawBehind { drawRect(backgroundColor.value) }) Box( modifier = Modifier - // expand bottom sheet when clicked on the header - .clickable( - enabled = bottomSheetState.currentValue == TangemSheetValue.PartiallyExpanded, - indication = null, - interactionSource = null, - ) { - coroutineScope.launch { bottomSheetState.expand() } - } .onFocusChanged { isSearchFieldFocused = it.isFocused },