Updated on 2026-08-14
This commit is contained in:
parent
e20f932081
commit
dd26ac3c0f
6 changed files with 48 additions and 1 deletions
|
|
@ -9,6 +9,7 @@ import com.tangem.feature.walletsettings.component.WalletSettingsComponent
|
|||
import com.tangem.features.details.DetailsFeatureToggles
|
||||
import com.tangem.features.details.component.DetailsComponent
|
||||
import com.tangem.features.disclaimer.api.components.DisclaimerComponent
|
||||
import com.tangem.features.managetokens.ManageTokensToggles
|
||||
import com.tangem.features.pushnotifications.api.featuretoggles.PushNotificationsFeatureToggles
|
||||
import com.tangem.features.pushnotifications.api.navigation.PushNotificationsRouter
|
||||
import com.tangem.features.send.api.navigation.SendRouter
|
||||
|
|
@ -55,6 +56,7 @@ internal class ChildFactory @Inject constructor(
|
|||
private val testerRouter: TesterRouter,
|
||||
private val detailsFeatureToggles: DetailsFeatureToggles,
|
||||
private val pushNotificationsFeatureToggles: PushNotificationsFeatureToggles,
|
||||
private val manageTokensToggles: ManageTokensToggles,
|
||||
private val pushNotificationRouter: PushNotificationsRouter,
|
||||
) {
|
||||
|
||||
|
|
@ -119,7 +121,11 @@ internal class ChildFactory @Inject constructor(
|
|||
route.asFragmentChild(Provider { HomeFragment() })
|
||||
}
|
||||
is AppRoute.ManageTokens -> {
|
||||
route.asFragmentChild(Provider { TokensListFragment() })
|
||||
if (manageTokensToggles.isFeatureEnabled) {
|
||||
TODO("Not implemented yet") // [REDACTED_JIRA]
|
||||
} else {
|
||||
route.asFragmentChild(Provider { TokensListFragment() })
|
||||
}
|
||||
}
|
||||
is AppRoute.OnboardingNote -> {
|
||||
route.asFragmentChild(Provider { OnboardingNoteFragment() })
|
||||
|
|
|
|||
|
|
@ -42,5 +42,9 @@
|
|||
{
|
||||
"name": "HOME_SCREEN_CALLBACKS_REFACTORING_ENABLED",
|
||||
"version": "5.14.0"
|
||||
},
|
||||
{
|
||||
"name": "NEW_MANAGE_TOKENS",
|
||||
"version": "undefined"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
package com.tangem.features.managetokens
|
||||
|
||||
interface ManageTokensToggles {
|
||||
val isFeatureEnabled: Boolean
|
||||
}
|
||||
|
|
@ -19,6 +19,7 @@ dependencies {
|
|||
implementation(projects.core.decompose)
|
||||
implementation(projects.core.ui)
|
||||
implementation(projects.common.routing)
|
||||
implementation(projects.core.featuretoggles)
|
||||
|
||||
/* AndroidX */
|
||||
implementation(deps.androidx.activity.compose)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
package com.tangem.features.managetokens
|
||||
|
||||
import com.tangem.core.featuretoggle.manager.FeatureTogglesManager
|
||||
|
||||
internal class DefaultManageTokensToggles(
|
||||
private val featureTogglesManager: FeatureTogglesManager,
|
||||
) : ManageTokensToggles {
|
||||
|
||||
override val isFeatureEnabled: Boolean
|
||||
get() = featureTogglesManager.isFeatureEnabled("NEW_MANAGE_TOKENS")
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.tangem.features.managetokens.di
|
||||
|
||||
import com.tangem.core.featuretoggle.manager.FeatureTogglesManager
|
||||
import com.tangem.features.managetokens.DefaultManageTokensToggles
|
||||
import com.tangem.features.managetokens.ManageTokensToggles
|
||||
import dagger.Module
|
||||
import dagger.Provides
|
||||
import dagger.hilt.InstallIn
|
||||
import dagger.hilt.components.SingletonComponent
|
||||
import javax.inject.Singleton
|
||||
|
||||
@Module
|
||||
@InstallIn(SingletonComponent::class)
|
||||
internal object FeatureModule {
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
fun provideFeatureToggles(featureTogglesManager: FeatureTogglesManager): ManageTokensToggles =
|
||||
DefaultManageTokensToggles(featureTogglesManager = featureTogglesManager)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue