Updated on 2026-08-14

This commit is contained in:
Tangem 2024-06-11 15:54:46 +04:00
parent 7a10191880
commit e4e18ffddd
11 changed files with 226 additions and 3 deletions

View file

@ -17,9 +17,10 @@ dependencies {
implementation(projects.domain.qrScanning.models)
implementation(projects.domain.tokens.models)
implementation(projects.domain.wallets.models)
implementation(projects.domain.staking.models)
/* Libs - Other */
api(deps.kotlin.serialization)
implementation(deps.androidx.core.ktx)
implementation(deps.kotlin.serialization)
implementation(deps.timber)
}

View file

@ -15,7 +15,7 @@ interface AppRouter {
/**
* The current navigation stack.
*/
val backStack: List<AppRoute>
val stack: List<AppRoute>
/**
* Pushes a new route to the navigation stack.
@ -25,6 +25,14 @@ interface AppRouter {
*/
fun push(route: AppRoute, onComplete: (isSuccess: Boolean) -> Unit = {})
/**
* Replaces ***all*** routes in the navigation stack with the specified [routes].
*
* @param routes The routes to replace the current stack with.
* @param onComplete The callback to be invoked when the operation is complete.
*/
fun replaceAll(vararg routes: AppRoute, onComplete: (isSuccess: Boolean) -> Unit = {})
/**
* Pops the top route from the navigation stack.
*
@ -33,7 +41,15 @@ interface AppRouter {
fun pop(onComplete: (isSuccess: Boolean) -> Unit = {})
/**
* Pops routes from the navigation stack until the specified route class is found.
* Pops routes from the navigation stack until the specified [route] is found.
*
* @param route The route to pop to.
* @param onComplete The callback to be invoked when the operation is complete.
*/
fun popTo(route: AppRoute, onComplete: (isSuccess: Boolean) -> Unit = {})
/**
* Pops routes from the navigation stack until the ***first*** specified [routeClass] is found.
*
* @param routeClass The route class to pop to.
* @param onComplete The callback to be invoked when the operation is complete.