Updated on 2026-08-14
This commit is contained in:
parent
40c7d20bda
commit
768b44f44f
16 changed files with 62 additions and 27 deletions
|
|
@ -6,6 +6,7 @@ import com.tangem.domain.common.extensions.withMainContext
|
||||||
import com.tangem.domain.wallets.models.UserWallet
|
import com.tangem.domain.wallets.models.UserWallet
|
||||||
import com.tangem.tap.common.redux.AppState
|
import com.tangem.tap.common.redux.AppState
|
||||||
import com.tangem.tap.common.redux.global.GlobalAction
|
import com.tangem.tap.common.redux.global.GlobalAction
|
||||||
|
import com.tangem.tap.common.url.urlOpener
|
||||||
import com.tangem.tap.domain.TapError
|
import com.tangem.tap.domain.TapError
|
||||||
import com.tangem.tap.proxy.redux.DaggerGraphState
|
import com.tangem.tap.proxy.redux.DaggerGraphState
|
||||||
import com.tangem.tap.scope
|
import com.tangem.tap.scope
|
||||||
|
|
@ -83,7 +84,7 @@ suspend fun dispatchOnMain(vararg actions: Action) {
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Store<*>.dispatchOpenUrl(url: String) {
|
fun Store<*>.dispatchOpenUrl(url: String) {
|
||||||
dispatch(NavigationAction.OpenUrl(url))
|
urlOpener.openUrl(url)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Store<*>.dispatchShare(url: String) {
|
fun Store<*>.dispatchShare(url: String) {
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import android.provider.Settings
|
||||||
import com.tangem.core.navigation.AppScreen
|
import com.tangem.core.navigation.AppScreen
|
||||||
import com.tangem.core.navigation.NavigationAction
|
import com.tangem.core.navigation.NavigationAction
|
||||||
import com.tangem.tap.activityResultCaller
|
import com.tangem.tap.activityResultCaller
|
||||||
import com.tangem.tap.common.CustomTabsManager
|
|
||||||
import com.tangem.tap.common.extensions.*
|
import com.tangem.tap.common.extensions.*
|
||||||
import com.tangem.tap.common.redux.AppState
|
import com.tangem.tap.common.redux.AppState
|
||||||
import com.tangem.tap.store
|
import com.tangem.tap.store
|
||||||
|
|
@ -47,11 +46,6 @@ val navigationMiddleware: Middleware<AppState> = { _, state ->
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
is NavigationAction.OpenUrl -> {
|
|
||||||
navState?.activity?.get()?.let {
|
|
||||||
CustomTabsManager().openUrl(action.url, it)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
is NavigationAction.OpenDocument -> {
|
is NavigationAction.OpenDocument -> {
|
||||||
val intent = Intent(Intent.ACTION_VIEW)
|
val intent = Intent(Intent.ACTION_VIEW)
|
||||||
intent.data = action.url
|
intent.data = action.url
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,11 @@ import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import com.google.android.material.bottomsheet.BottomSheetDialog
|
import com.google.android.material.bottomsheet.BottomSheetDialog
|
||||||
import com.tangem.core.analytics.Analytics
|
import com.tangem.core.analytics.Analytics
|
||||||
import com.tangem.core.navigation.NavigationAction
|
|
||||||
import com.tangem.tap.common.analytics.events.Token
|
import com.tangem.tap.common.analytics.events.Token
|
||||||
import com.tangem.tap.common.extensions.dispatchDialogHide
|
import com.tangem.tap.common.extensions.dispatchDialogHide
|
||||||
import com.tangem.tap.common.extensions.dispatchOpenUrl
|
import com.tangem.tap.common.extensions.dispatchOpenUrl
|
||||||
import com.tangem.tap.common.redux.AppDialog
|
import com.tangem.tap.common.redux.AppDialog
|
||||||
|
import com.tangem.tap.common.url.urlOpener
|
||||||
import com.tangem.tap.store
|
import com.tangem.tap.store
|
||||||
import com.tangem.wallet.databinding.DialogRussiansCardholdersWarningBinding
|
import com.tangem.wallet.databinding.DialogRussiansCardholdersWarningBinding
|
||||||
|
|
||||||
|
|
@ -44,7 +44,7 @@ class RussianCardholdersWarningBottomSheetDialog(
|
||||||
dismiss()
|
dismiss()
|
||||||
}
|
}
|
||||||
binding?.btnNo?.setOnClickListener {
|
binding?.btnNo?.setOnClickListener {
|
||||||
store.dispatch(NavigationAction.OpenUrl(INSTRUCTION_URL))
|
urlOpener.openUrl(INSTRUCTION_URL)
|
||||||
dismiss()
|
dismiss()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package com.tangem.tap.common
|
package com.tangem.tap.common.url
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent.FLAG_ACTIVITY_NEW_TASK
|
import android.content.Intent.FLAG_ACTIVITY_NEW_TASK
|
||||||
|
|
@ -8,12 +8,24 @@ import androidx.browser.customtabs.CustomTabColorSchemeParams
|
||||||
import androidx.browser.customtabs.CustomTabsIntent
|
import androidx.browser.customtabs.CustomTabsIntent
|
||||||
import androidx.browser.customtabs.CustomTabsIntent.COLOR_SCHEME_DARK
|
import androidx.browser.customtabs.CustomTabsIntent.COLOR_SCHEME_DARK
|
||||||
import androidx.browser.customtabs.CustomTabsIntent.COLOR_SCHEME_LIGHT
|
import androidx.browser.customtabs.CustomTabsIntent.COLOR_SCHEME_LIGHT
|
||||||
|
import com.tangem.core.navigation.url.UrlOpener
|
||||||
import com.tangem.tap.common.apptheme.MutableAppThemeModeHolder
|
import com.tangem.tap.common.apptheme.MutableAppThemeModeHolder
|
||||||
import com.tangem.tap.common.extensions.getColorCompat
|
import com.tangem.tap.common.extensions.getColorCompat
|
||||||
|
import com.tangem.tap.foregroundActivityObserver
|
||||||
|
import com.tangem.tap.withForegroundActivity
|
||||||
import com.tangem.wallet.R
|
import com.tangem.wallet.R
|
||||||
|
|
||||||
class CustomTabsManager {
|
internal val urlOpener = CustomTabsUrlOpener
|
||||||
fun openUrl(url: String, context: Context) {
|
|
||||||
|
internal object CustomTabsUrlOpener : UrlOpener {
|
||||||
|
|
||||||
|
override fun openUrl(url: String) {
|
||||||
|
foregroundActivityObserver.withForegroundActivity {
|
||||||
|
openUrl(url, context = it)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun openUrl(url: String, context: Context) {
|
||||||
if (url.isEmpty()) return
|
if (url.isEmpty()) return
|
||||||
val customTabsIntent = CustomTabsIntent.Builder()
|
val customTabsIntent = CustomTabsIntent.Builder()
|
||||||
.setDefaultColorSchemeParams(
|
.setDefaultColorSchemeParams(
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
package com.tangem.tap.di
|
package com.tangem.tap.di
|
||||||
|
|
||||||
import com.tangem.core.navigation.feedback.FeedbackManager
|
import com.tangem.core.navigation.feedback.FeedbackManager
|
||||||
|
import com.tangem.core.navigation.url.UrlOpener
|
||||||
import com.tangem.tap.common.feedback.ProxyFeedbackManager
|
import com.tangem.tap.common.feedback.ProxyFeedbackManager
|
||||||
|
import com.tangem.tap.common.url.CustomTabsUrlOpener
|
||||||
import dagger.Module
|
import dagger.Module
|
||||||
import dagger.Provides
|
import dagger.Provides
|
||||||
import dagger.hilt.InstallIn
|
import dagger.hilt.InstallIn
|
||||||
|
|
@ -12,6 +14,10 @@ import javax.inject.Singleton
|
||||||
@InstallIn(SingletonComponent::class)
|
@InstallIn(SingletonComponent::class)
|
||||||
internal object UtilsModule {
|
internal object UtilsModule {
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
@Singleton
|
||||||
|
fun provideUrlOpener(): UrlOpener = CustomTabsUrlOpener
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
fun provideFeedbackManager(): FeedbackManager = ProxyFeedbackManager()
|
fun provideFeedbackManager(): FeedbackManager = ProxyFeedbackManager()
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ import com.tangem.tap.common.extensions.dispatchWithMain
|
||||||
import com.tangem.tap.common.feedback.FeedbackEmail
|
import com.tangem.tap.common.feedback.FeedbackEmail
|
||||||
import com.tangem.tap.common.redux.AppState
|
import com.tangem.tap.common.redux.AppState
|
||||||
import com.tangem.tap.common.redux.global.GlobalAction
|
import com.tangem.tap.common.redux.global.GlobalAction
|
||||||
|
import com.tangem.tap.common.url.urlOpener
|
||||||
import com.tangem.tap.features.details.redux.DetailsAction
|
import com.tangem.tap.features.details.redux.DetailsAction
|
||||||
import com.tangem.tap.features.details.redux.DetailsState
|
import com.tangem.tap.features.details.redux.DetailsState
|
||||||
import com.tangem.tap.features.disclaimer.redux.DisclaimerAction
|
import com.tangem.tap.features.disclaimer.redux.DisclaimerAction
|
||||||
|
|
@ -179,7 +180,7 @@ internal class DetailsViewModel(
|
||||||
|
|
||||||
private fun handleSocialNetworkClick(link: SocialNetworkLink) {
|
private fun handleSocialNetworkClick(link: SocialNetworkLink) {
|
||||||
Analytics.send(Settings.ButtonSocialNetwork(link.network))
|
Analytics.send(Settings.ButtonSocialNetwork(link.network))
|
||||||
store.dispatchOnMain(NavigationAction.OpenUrl(link.url))
|
urlOpener.openUrl(link.url)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getSocialLinks(): ImmutableList<SocialNetworkLink> {
|
private fun getSocialLinks(): ImmutableList<SocialNetworkLink> {
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,6 @@ sealed class NavigationAction : Action {
|
||||||
|
|
||||||
data class PopBackTo(val screen: AppScreen? = null, val inclusive: Boolean = false) : NavigationAction()
|
data class PopBackTo(val screen: AppScreen? = null, val inclusive: Boolean = false) : NavigationAction()
|
||||||
|
|
||||||
data class OpenUrl(val url: String) : NavigationAction()
|
|
||||||
|
|
||||||
data class OpenDocument(val url: Uri) : NavigationAction()
|
data class OpenDocument(val url: Uri) : NavigationAction()
|
||||||
|
|
||||||
object OpenBiometricsSettings : NavigationAction()
|
object OpenBiometricsSettings : NavigationAction()
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
package com.tangem.core.navigation.url
|
||||||
|
|
||||||
|
class DummyUrlOpener : UrlOpener {
|
||||||
|
|
||||||
|
override fun openUrl(url: String) {
|
||||||
|
/* no-op */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
package com.tangem.core.navigation.url
|
||||||
|
|
||||||
|
interface UrlOpener {
|
||||||
|
|
||||||
|
fun openUrl(url: String)
|
||||||
|
}
|
||||||
|
|
@ -6,7 +6,7 @@ import com.tangem.core.navigation.NavigationAction
|
||||||
import com.tangem.core.navigation.ReduxNavController
|
import com.tangem.core.navigation.ReduxNavController
|
||||||
import com.tangem.core.navigation.feedback.FeedbackManager
|
import com.tangem.core.navigation.feedback.FeedbackManager
|
||||||
import com.tangem.core.navigation.feedback.FeedbackType
|
import com.tangem.core.navigation.feedback.FeedbackType
|
||||||
import com.tangem.domain.redux.ReduxStateHolder
|
import com.tangem.core.navigation.url.UrlOpener
|
||||||
import com.tangem.features.details.routing.DetailsRoute
|
import com.tangem.features.details.routing.DetailsRoute
|
||||||
import com.tangem.features.tester.api.TesterRouter
|
import com.tangem.features.tester.api.TesterRouter
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
@ -14,9 +14,9 @@ import javax.inject.Inject
|
||||||
// TODO: Remove after [REDACTED_JIRA]
|
// TODO: Remove after [REDACTED_JIRA]
|
||||||
internal class DetailsRouter @Inject constructor(
|
internal class DetailsRouter @Inject constructor(
|
||||||
private val reduxNavController: ReduxNavController,
|
private val reduxNavController: ReduxNavController,
|
||||||
private val reduxStateHolder: ReduxStateHolder,
|
|
||||||
private val feedbackManager: FeedbackManager,
|
private val feedbackManager: FeedbackManager,
|
||||||
private val testerRouter: TesterRouter,
|
private val testerRouter: TesterRouter,
|
||||||
|
private val urlOpener: UrlOpener,
|
||||||
) : Router {
|
) : Router {
|
||||||
|
|
||||||
override fun push(route: Route, onComplete: (isSuccess: Boolean) -> Unit) {
|
override fun push(route: Route, onComplete: (isSuccess: Boolean) -> Unit) {
|
||||||
|
|
@ -32,7 +32,7 @@ internal class DetailsRouter @Inject constructor(
|
||||||
testerRouter.startTesterScreen()
|
testerRouter.startTesterScreen()
|
||||||
}
|
}
|
||||||
is DetailsRoute.Url -> {
|
is DetailsRoute.Url -> {
|
||||||
reduxNavController.navigate(NavigationAction.OpenUrl(route.url))
|
urlOpener.openUrl(route.url)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onComplete(true)
|
onComplete(true)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.tangem.features.send.impl.di
|
package com.tangem.features.send.impl.di
|
||||||
|
|
||||||
import com.tangem.core.navigation.ReduxNavController
|
import com.tangem.core.navigation.ReduxNavController
|
||||||
|
import com.tangem.core.navigation.url.UrlOpener
|
||||||
import com.tangem.features.send.api.navigation.SendRouter
|
import com.tangem.features.send.api.navigation.SendRouter
|
||||||
import com.tangem.features.send.impl.navigation.DefaultSendRouter
|
import com.tangem.features.send.impl.navigation.DefaultSendRouter
|
||||||
import dagger.Module
|
import dagger.Module
|
||||||
|
|
@ -18,7 +19,7 @@ internal object SendRouterModule {
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@ActivityScoped
|
@ActivityScoped
|
||||||
fun provideSendRouter(reduxNavController: ReduxNavController): SendRouter {
|
fun provideSendRouter(reduxNavController: ReduxNavController, urlOpener: UrlOpener): SendRouter {
|
||||||
return DefaultSendRouter(reduxNavController)
|
return DefaultSendRouter(reduxNavController, urlOpener)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -5,6 +5,7 @@ import androidx.fragment.app.Fragment
|
||||||
import com.tangem.core.navigation.AppScreen
|
import com.tangem.core.navigation.AppScreen
|
||||||
import com.tangem.core.navigation.NavigationAction
|
import com.tangem.core.navigation.NavigationAction
|
||||||
import com.tangem.core.navigation.ReduxNavController
|
import com.tangem.core.navigation.ReduxNavController
|
||||||
|
import com.tangem.core.navigation.url.UrlOpener
|
||||||
import com.tangem.domain.qrscanning.models.SourceType
|
import com.tangem.domain.qrscanning.models.SourceType
|
||||||
import com.tangem.domain.tokens.model.CryptoCurrency
|
import com.tangem.domain.tokens.model.CryptoCurrency
|
||||||
import com.tangem.domain.wallets.models.UserWalletId
|
import com.tangem.domain.wallets.models.UserWalletId
|
||||||
|
|
@ -14,12 +15,13 @@ import com.tangem.features.tokendetails.navigation.TokenDetailsRouter
|
||||||
|
|
||||||
internal class DefaultSendRouter(
|
internal class DefaultSendRouter(
|
||||||
private val reduxNavController: ReduxNavController,
|
private val reduxNavController: ReduxNavController,
|
||||||
|
private val urlOpener: UrlOpener,
|
||||||
) : InnerSendRouter {
|
) : InnerSendRouter {
|
||||||
|
|
||||||
override fun getEntryFragment(): Fragment = SendFragment.create()
|
override fun getEntryFragment(): Fragment = SendFragment.create()
|
||||||
|
|
||||||
override fun openUrl(url: String) {
|
override fun openUrl(url: String) {
|
||||||
reduxNavController.navigate(NavigationAction.OpenUrl(url = url))
|
urlOpener.openUrl(url)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun openTokenDetails(userWalletId: UserWalletId, currency: CryptoCurrency) {
|
override fun openTokenDetails(userWalletId: UserWalletId, currency: CryptoCurrency) {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.tangem.feature.tokendetails.di
|
package com.tangem.feature.tokendetails.di
|
||||||
|
|
||||||
import com.tangem.core.navigation.ReduxNavController
|
import com.tangem.core.navigation.ReduxNavController
|
||||||
|
import com.tangem.core.navigation.url.UrlOpener
|
||||||
import com.tangem.feature.tokendetails.presentation.router.DefaultTokenDetailsRouter
|
import com.tangem.feature.tokendetails.presentation.router.DefaultTokenDetailsRouter
|
||||||
import com.tangem.features.tokendetails.navigation.TokenDetailsRouter
|
import com.tangem.features.tokendetails.navigation.TokenDetailsRouter
|
||||||
import dagger.Module
|
import dagger.Module
|
||||||
|
|
@ -15,7 +16,7 @@ internal object TokenDetailsRouterModule {
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@ActivityScoped
|
@ActivityScoped
|
||||||
fun provideTokenDetailsRouter(reduxNavController: ReduxNavController): TokenDetailsRouter {
|
fun provideTokenDetailsRouter(reduxNavController: ReduxNavController, urlOpener: UrlOpener): TokenDetailsRouter {
|
||||||
return DefaultTokenDetailsRouter(reduxNavController)
|
return DefaultTokenDetailsRouter(reduxNavController, urlOpener)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -5,6 +5,7 @@ import androidx.fragment.app.Fragment
|
||||||
import com.tangem.core.navigation.AppScreen
|
import com.tangem.core.navigation.AppScreen
|
||||||
import com.tangem.core.navigation.NavigationAction
|
import com.tangem.core.navigation.NavigationAction
|
||||||
import com.tangem.core.navigation.ReduxNavController
|
import com.tangem.core.navigation.ReduxNavController
|
||||||
|
import com.tangem.core.navigation.url.UrlOpener
|
||||||
import com.tangem.domain.tokens.model.CryptoCurrency
|
import com.tangem.domain.tokens.model.CryptoCurrency
|
||||||
import com.tangem.domain.wallets.models.UserWalletId
|
import com.tangem.domain.wallets.models.UserWalletId
|
||||||
import com.tangem.feature.tokendetails.presentation.TokenDetailsFragment
|
import com.tangem.feature.tokendetails.presentation.TokenDetailsFragment
|
||||||
|
|
@ -12,6 +13,7 @@ import com.tangem.features.tokendetails.navigation.TokenDetailsRouter
|
||||||
|
|
||||||
internal class DefaultTokenDetailsRouter(
|
internal class DefaultTokenDetailsRouter(
|
||||||
private val reduxNavController: ReduxNavController,
|
private val reduxNavController: ReduxNavController,
|
||||||
|
private val urlOpener: UrlOpener,
|
||||||
) : InnerTokenDetailsRouter {
|
) : InnerTokenDetailsRouter {
|
||||||
|
|
||||||
override fun getEntryFragment(): Fragment = TokenDetailsFragment()
|
override fun getEntryFragment(): Fragment = TokenDetailsFragment()
|
||||||
|
|
@ -21,7 +23,7 @@ internal class DefaultTokenDetailsRouter(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun openUrl(url: String) {
|
override fun openUrl(url: String) {
|
||||||
reduxNavController.navigate(NavigationAction.OpenUrl(url = url))
|
urlOpener.openUrl(url)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun share(text: String) {
|
override fun share(text: String) {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.tangem.feature.wallet.di
|
package com.tangem.feature.wallet.di
|
||||||
|
|
||||||
import com.tangem.core.navigation.ReduxNavController
|
import com.tangem.core.navigation.ReduxNavController
|
||||||
|
import com.tangem.core.navigation.url.UrlOpener
|
||||||
import com.tangem.feature.wallet.presentation.router.DefaultWalletRouter
|
import com.tangem.feature.wallet.presentation.router.DefaultWalletRouter
|
||||||
import com.tangem.features.wallet.navigation.WalletRouter
|
import com.tangem.features.wallet.navigation.WalletRouter
|
||||||
import dagger.Module
|
import dagger.Module
|
||||||
|
|
@ -15,7 +16,7 @@ internal object WalletRouterModule {
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@ActivityScoped
|
@ActivityScoped
|
||||||
fun provideWalletRouter(reduxNavController: ReduxNavController): WalletRouter {
|
fun provideWalletRouter(reduxNavController: ReduxNavController, urlOpener: UrlOpener): WalletRouter {
|
||||||
return DefaultWalletRouter(reduxNavController = reduxNavController)
|
return DefaultWalletRouter(reduxNavController, urlOpener)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -20,6 +20,7 @@ import com.tangem.core.navigation.AppScreen
|
||||||
import com.tangem.core.navigation.NavigationAction
|
import com.tangem.core.navigation.NavigationAction
|
||||||
import com.tangem.core.navigation.ReduxNavController
|
import com.tangem.core.navigation.ReduxNavController
|
||||||
import com.tangem.core.navigation.StateDialog
|
import com.tangem.core.navigation.StateDialog
|
||||||
|
import com.tangem.core.navigation.url.UrlOpener
|
||||||
import com.tangem.domain.tokens.model.CryptoCurrencyStatus
|
import com.tangem.domain.tokens.model.CryptoCurrencyStatus
|
||||||
import com.tangem.domain.wallets.models.UserWalletId
|
import com.tangem.domain.wallets.models.UserWalletId
|
||||||
import com.tangem.feature.onboarding.navigation.OnboardingRouter
|
import com.tangem.feature.onboarding.navigation.OnboardingRouter
|
||||||
|
|
@ -37,6 +38,7 @@ import kotlin.properties.Delegates
|
||||||
/** Default implementation of wallet feature router */
|
/** Default implementation of wallet feature router */
|
||||||
internal class DefaultWalletRouter(
|
internal class DefaultWalletRouter(
|
||||||
private val reduxNavController: ReduxNavController,
|
private val reduxNavController: ReduxNavController,
|
||||||
|
private val urlOpener: UrlOpener,
|
||||||
) : InnerWalletRouter {
|
) : InnerWalletRouter {
|
||||||
|
|
||||||
private var navController: NavHostController by Delegates.notNull()
|
private var navController: NavHostController by Delegates.notNull()
|
||||||
|
|
@ -138,7 +140,7 @@ internal class DefaultWalletRouter(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun openUrl(url: String) {
|
override fun openUrl(url: String) {
|
||||||
reduxNavController.navigate(action = NavigationAction.OpenUrl(url))
|
urlOpener.openUrl(url)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun openTokenDetails(userWalletId: UserWalletId, currencyStatus: CryptoCurrencyStatus) {
|
override fun openTokenDetails(userWalletId: UserWalletId, currencyStatus: CryptoCurrencyStatus) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue