Updated on 2026-08-14

This commit is contained in:
Tangem 2026-07-16 11:29:22 +02:00
parent 246ab4b47e
commit e2e81b0810
2 changed files with 10 additions and 7 deletions

View file

@ -1,6 +1,9 @@
package com.tangem.features.commonfeatures.impl.managefunds package com.tangem.features.commonfeatures.impl.managefunds
import androidx.compose.animation.AnimatedContent import androidx.compose.animation.AnimatedContent
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.animation.togetherWith
import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.padding
@ -11,6 +14,7 @@ import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.testTag import androidx.compose.ui.platform.testTag
import androidx.lifecycle.compose.collectAsStateWithLifecycle import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.tangem.common.ui.markets.action.TokenActionsContext
import com.tangem.core.decompose.context.AppComponentContext import com.tangem.core.decompose.context.AppComponentContext
import com.tangem.core.decompose.context.child import com.tangem.core.decompose.context.child
import com.tangem.core.decompose.model.getOrCreateModel import com.tangem.core.decompose.model.getOrCreateModel
@ -22,14 +26,13 @@ import com.tangem.core.ui.ds2.button.TangemButton
import com.tangem.core.ui.res.TangemTheme import com.tangem.core.ui.res.TangemTheme
import com.tangem.core.ui.res.TangemThemeRedesign import com.tangem.core.ui.res.TangemThemeRedesign
import com.tangem.core.ui.test.BaseBottomSheetTestTags import com.tangem.core.ui.test.BaseBottomSheetTestTags
import com.tangem.features.commonfeatures.api.managefunds.ManageFundsComponent
import com.tangem.features.commonfeatures.api.choosetoken.ChooseTokenComponent import com.tangem.features.commonfeatures.api.choosetoken.ChooseTokenComponent
import com.tangem.features.commonfeatures.api.managefunds.ManageFundsComponent
import com.tangem.features.commonfeatures.impl.R
import com.tangem.features.commonfeatures.impl.managefunds.model.ManageFundsModel import com.tangem.features.commonfeatures.impl.managefunds.model.ManageFundsModel
import com.tangem.features.commonfeatures.impl.managefunds.model.uiSpec import com.tangem.features.commonfeatures.impl.managefunds.model.uiSpec
import com.tangem.common.ui.markets.action.TokenActionsContext
import com.tangem.features.commonfeatures.impl.tokenactions.TokenActionsComponent import com.tangem.features.commonfeatures.impl.tokenactions.TokenActionsComponent
import com.tangem.features.commonfeatures.impl.userportfolio.UserPortfolioComponent import com.tangem.features.commonfeatures.impl.userportfolio.UserPortfolioComponent
import com.tangem.features.commonfeatures.impl.R
import dagger.assisted.Assisted import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject import dagger.assisted.AssistedInject
@ -140,6 +143,8 @@ internal class DefaultManageFundsComponent @AssistedInject constructor(
AnimatedContent( AnimatedContent(
targetState = route, targetState = route,
modifier = animatedContentModifier, modifier = animatedContentModifier,
transitionSpec = { fadeIn().togetherWith(fadeOut()) },
contentKey = { route -> route::class },
label = "ManageFundsContentAnimation", label = "ManageFundsContentAnimation",
) { animatedRoute -> ) { animatedRoute ->
ManageFundsRouteContent( ManageFundsRouteContent(

View file

@ -3,10 +3,8 @@ package com.tangem.features.commonfeatures.impl.tokenactions.ui
import android.content.res.Configuration import android.content.res.Configuration
import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.core.MutableTransitionState import androidx.compose.animation.core.MutableTransitionState
import androidx.compose.animation.expandVertically
import androidx.compose.animation.fadeIn import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut import androidx.compose.animation.fadeOut
import androidx.compose.animation.shrinkVertically
import androidx.compose.foundation.background import androidx.compose.foundation.background
import androidx.compose.foundation.layout.* import androidx.compose.foundation.layout.*
import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.shape.RoundedCornerShape
@ -119,8 +117,8 @@ private fun QuickActionsList(state: TokenActionsUM, modifier: Modifier = Modifie
} }
AnimatedVisibility( AnimatedVisibility(
visibleState = transitionState, visibleState = transitionState,
enter = fadeIn() + expandVertically(), enter = fadeIn(),
exit = fadeOut() + shrinkVertically(), exit = fadeOut(),
) { ) {
val actionModifier = when (actionUM) { val actionModifier = when (actionUM) {
is QuickActionUM.V1.Buy, is QuickActionUM.V2.Buy -> is QuickActionUM.V1.Buy, is QuickActionUM.V2.Buy ->