Updated on 2026-08-14

This commit is contained in:
Tangem 2026-06-25 19:41:53 +05:00
parent ec06f2e51c
commit 105bad6051
11 changed files with 156 additions and 0 deletions

View file

@ -170,5 +170,9 @@
{
"name": "AND_14829_WARNINGS_REFACTORING_ENABLED",
"version": "undefined"
},
{
"name": "TWI_1469_FOR_YOU_ENABLED",
"version": "undefined"
}
]

1
features/for-you/api/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/build

View file

@ -0,0 +1,20 @@
plugins {
alias(deps.plugins.android.library)
alias(deps.plugins.kotlin.android)
alias(deps.plugins.kotlin.serialization)
id("kotlin-parcelize")
id("configuration")
}
android {
namespace = "com.tangem.features.foryou.api"
}
dependencies {
/** Project - Core */
implementation(projects.core.decompose)
implementation(projects.core.ui)
/** Other dependencies */
implementation(deps.compose.foundation)
}

View file

@ -0,0 +1,9 @@
package com.tangem.features.foryou
import com.tangem.core.decompose.factory.ComponentFactory
import com.tangem.core.ui.decompose.ComposableModularBottomSheetContentComponent
interface ForYouComponent : ComposableModularBottomSheetContentComponent {
interface Factory : ComponentFactory<Unit, ForYouComponent>
}

View file

@ -0,0 +1,5 @@
package com.tangem.features.foryou
interface ForYouFeatureToggles {
val isForYouEnabled: Boolean
}

1
features/for-you/impl/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/build

View file

@ -0,0 +1,30 @@
plugins {
alias(deps.plugins.android.library)
alias(deps.plugins.kotlin.android)
alias(deps.plugins.kotlin.kapt)
alias(deps.plugins.hilt.android)
id("configuration")
}
android {
namespace = "com.tangem.features.foryou.impl"
}
dependencies {
/** Features */
implementation(projects.features.forYou.api)
/** Core */
implementation(projects.core.decompose)
implementation(projects.core.ui)
implementation(projects.core.configToggles)
implementation(deps.compose.ui)
implementation(deps.compose.foundation)
implementation(deps.lifecycle.compose)
/** DI */
implementation(deps.hilt.android)
kapt(deps.hilt.kapt)
}

View file

@ -0,0 +1,37 @@
package com.tangem.features.foryou.impl
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.runtime.Composable
import androidx.compose.runtime.State
import androidx.compose.ui.Modifier
import com.tangem.core.decompose.context.AppComponentContext
import com.tangem.core.ui.components.bottomsheets.state.BottomSheetState
import com.tangem.features.foryou.ForYouComponent
import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject
internal class DefaultForYouComponent @AssistedInject constructor(
@Assisted context: AppComponentContext,
@Suppress("UnusedPrivateMember") @Assisted params: Unit,
) : AppComponentContext by context, ForYouComponent {
@Composable
override fun Title(bottomSheetState: State<BottomSheetState>) {
TODO("Not yet implemented")
}
@Composable
override fun Content(
bottomSheetState: State<BottomSheetState>,
contentPadding: PaddingValues,
modifier: Modifier,
) {
TODO("Not yet implemented")
}
@AssistedFactory
interface Factory : ForYouComponent.Factory {
override fun create(context: AppComponentContext, params: Unit): DefaultForYouComponent
}
}

View file

@ -0,0 +1,33 @@
package com.tangem.features.foryou.impl.di
import com.tangem.core.configtoggle.feature.FeatureTogglesManager
import com.tangem.features.foryou.ForYouComponent
import com.tangem.features.foryou.ForYouFeatureToggles
import com.tangem.features.foryou.impl.DefaultForYouComponent
import com.tangem.features.foryou.impl.featuretoggles.DefaultForYouFeatureToggles
import dagger.Binds
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 ForYouFeatureModule {
@Provides
@Singleton
fun provideForYouFeatureToggles(featureTogglesManager: FeatureTogglesManager): ForYouFeatureToggles {
return DefaultForYouFeatureToggles(featureTogglesManager = featureTogglesManager)
}
}
@Module
@InstallIn(SingletonComponent::class)
internal interface ForYouComponentModule {
@Binds
@Singleton
fun bindForYouComponent(factory: DefaultForYouComponent.Factory): ForYouComponent.Factory
}

View file

@ -0,0 +1,13 @@
package com.tangem.features.foryou.impl.featuretoggles
import com.tangem.core.configtoggle.FeatureToggles
import com.tangem.core.configtoggle.feature.FeatureTogglesManager
import com.tangem.features.foryou.ForYouFeatureToggles
import javax.inject.Inject
internal class DefaultForYouFeatureToggles @Inject constructor(
private val featureTogglesManager: FeatureTogglesManager,
) : ForYouFeatureToggles {
override val isForYouEnabled: Boolean
get() = featureTogglesManager.isFeatureEnabled(FeatureToggles.TWI_1469_FOR_YOU_ENABLED)
}

View file

@ -354,6 +354,9 @@ include(":features:virtual-accounts:details:impl")
include(":features:common-features:api")
include(":features:common-features:impl")
include(":features:for-you:api")
include(":features:for-you:impl")
// endregion Feature modules
// region Domain modules