Updated on 2026-08-14
This commit is contained in:
parent
587a0c8624
commit
88cf7ec1af
212 changed files with 1223 additions and 1128 deletions
|
|
@ -34,17 +34,17 @@ import com.tangem.core.ui.res.TangemTheme
|
|||
import com.tangem.tap.routing.component.RoutingComponent
|
||||
import com.tangem.tap.routing.transitions.RoutingTransitionAnimationFactory
|
||||
|
||||
@Suppress("LongParameterList")
|
||||
@Suppress("LongParameterList", "ReusedModifierInstance")
|
||||
@OptIn(ExperimentalDecomposeApi::class)
|
||||
@Composable
|
||||
internal fun RootContent(
|
||||
stack: Value<ChildStack<AppRoute, RoutingComponent.Child>>,
|
||||
backHandler: BackHandler,
|
||||
uiDependencies: UiDependencies,
|
||||
wcContent: @Composable (modifier: Modifier) -> Unit,
|
||||
hotAccessCodeContent: @Composable (modifier: Modifier) -> Unit,
|
||||
onBack: () -> Unit,
|
||||
modifier: Modifier = Modifier,
|
||||
wcContent: @Composable (modifier: Modifier) -> Unit,
|
||||
hotAccessCodeContent: @Composable (modifier: Modifier) -> Unit,
|
||||
) {
|
||||
val context = LocalContext.current
|
||||
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ internal class DefaultRoutingComponent @AssistedInject constructor(
|
|||
AppRoute.Wallet
|
||||
}
|
||||
}.also {
|
||||
appRouterConfig.isInitialized.value = true
|
||||
appRouterConfig.initializedState.value = true
|
||||
checkForUnfinishedBackup()
|
||||
}
|
||||
}
|
||||
|
|
@ -141,13 +141,13 @@ internal class DefaultRoutingComponent @AssistedInject constructor(
|
|||
@Composable
|
||||
override fun Content(modifier: Modifier) {
|
||||
RootContent(
|
||||
modifier = modifier,
|
||||
stack = stack,
|
||||
backHandler = backHandler,
|
||||
uiDependencies = uiDependencies,
|
||||
onBack = router::pop,
|
||||
modifier = modifier,
|
||||
wcContent = { wcRoutingComponent.Content(it) },
|
||||
hotAccessCodeContent = { hotAccessCodeRequestComponent.Content(it) },
|
||||
backHandler = backHandler,
|
||||
onBack = router::pop,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ internal interface AppRouterConfig {
|
|||
var routerScope: CoroutineScope?
|
||||
var componentRouter: Router?
|
||||
var stack: List<AppRoute>?
|
||||
val isInitialized: MutableStateFlow<Boolean>
|
||||
val initializedState: MutableStateFlow<Boolean>
|
||||
|
||||
// TODO: Replace with UI message handler: [REDACTED_JIRA]
|
||||
var snackbarHandler: SnackbarHandler?
|
||||
|
|
|
|||
|
|
@ -11,5 +11,5 @@ internal class MutableAppRouterConfig : AppRouterConfig {
|
|||
override var componentRouter: Router? = null
|
||||
override var stack: List<AppRoute>? = null
|
||||
override var snackbarHandler: SnackbarHandler? = null
|
||||
override val isInitialized: MutableStateFlow<Boolean> = MutableStateFlow(false)
|
||||
override val initializedState: MutableStateFlow<Boolean> = MutableStateFlow(false)
|
||||
}
|
||||
|
|
@ -4,13 +4,10 @@ import androidx.compose.animation.core.CubicBezierEasing
|
|||
import androidx.compose.animation.core.FiniteAnimationSpec
|
||||
import androidx.compose.animation.core.tween
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.scale
|
||||
import androidx.compose.ui.graphics.graphicsLayer
|
||||
import androidx.compose.ui.layout.layout
|
||||
import com.arkivanov.decompose.extensions.compose.stack.animation.*
|
||||
import com.tangem.common.routing.AppRoute
|
||||
import kotlin.compareTo
|
||||
import kotlin.times
|
||||
|
||||
object RoutingTransitionAnimationFactory {
|
||||
|
||||
|
|
@ -58,7 +55,7 @@ object RoutingTransitionAnimationFactory {
|
|||
|
||||
@Suppress("MagicNumber")
|
||||
private fun slideAndFade(directions: Set<Direction>? = null): StackAnimator {
|
||||
val easing = CubicBezierEasing(0.55f, 0.0f, 0.0f, 1f)
|
||||
val easing = CubicBezierEasing(a = 0.55f, b = 0.0f, c = 0.0f, d = 1f)
|
||||
|
||||
return stackAnimator(
|
||||
animationSpec = tween(durationMillis = 400, easing = easing),
|
||||
|
|
|
|||
|
|
@ -183,10 +183,10 @@ internal class ChildFactory @Inject constructor(
|
|||
token = route.token,
|
||||
appCurrency = route.appCurrency,
|
||||
showPortfolio = route.showPortfolio,
|
||||
analyticsParams = route.analyticsParams?.let {
|
||||
analyticsParams = route.analyticsParams?.let { params ->
|
||||
MarketsTokenDetailsComponent.AnalyticsParams(
|
||||
blockchain = it.blockchain,
|
||||
source = it.source,
|
||||
blockchain = params.blockchain,
|
||||
source = params.source,
|
||||
)
|
||||
},
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue