From cdc3f78320db9a9529566a81a1e6b5419fd469a8 Mon Sep 17 00:00:00 2001 From: Tangem Date: Mon, 26 Aug 2024 14:28:51 +0300 Subject: [PATCH] Updated on 2026-08-14 --- .../details/impl/DefaultMarketsTokenDetailsComponent.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/features/markets/impl/src/main/kotlin/com/tangem/features/markets/details/impl/DefaultMarketsTokenDetailsComponent.kt b/features/markets/impl/src/main/kotlin/com/tangem/features/markets/details/impl/DefaultMarketsTokenDetailsComponent.kt index ed098bec45..a1ea813365 100644 --- a/features/markets/impl/src/main/kotlin/com/tangem/features/markets/details/impl/DefaultMarketsTokenDetailsComponent.kt +++ b/features/markets/impl/src/main/kotlin/com/tangem/features/markets/details/impl/DefaultMarketsTokenDetailsComponent.kt @@ -1,5 +1,6 @@ package com.tangem.features.markets.details.impl +import androidx.activity.compose.BackHandler import androidx.compose.runtime.* import androidx.compose.ui.Modifier import androidx.compose.ui.unit.Dp @@ -69,6 +70,10 @@ internal class DefaultMarketsTokenDetailsComponent @AssistedInject constructor( model.isVisibleOnScreen.value = bsState == BottomSheetState.EXPANDED } + BackHandler(enabled = bsState == BottomSheetState.EXPANDED) { + navigateBack() + } + MarketsTokenDetailsContent( modifier = modifier, backgroundColor = LocalMainBottomSheetColor.current.value, @@ -84,6 +89,10 @@ internal class DefaultMarketsTokenDetailsComponent @AssistedInject constructor( @Composable override fun Content(modifier: Modifier) { + BackHandler { + navigateBack() + } + LifecycleStartEffect(Unit) { model.isVisibleOnScreen.value = true onStopOrDispose {