Updated on 2026-08-14

This commit is contained in:
Tangem 2026-05-15 13:06:26 +03:00
parent c2e8cb82a7
commit c428dc5bf5
9 changed files with 148 additions and 0 deletions

View file

@ -0,0 +1,9 @@
plugins {
alias(deps.plugins.android.library)
alias(deps.plugins.kotlin.android)
id("configuration")
}
android {
namespace = "com.tangem.features.pushnotificationsettings.api"
}

View file

@ -0,0 +1,5 @@
package com.tangem.features.pushnotificationsettings
interface PushNotificationSettingsFeatureToggles {
val isPushNotificationSettingsEnabled: Boolean
}

View file

@ -0,0 +1,26 @@
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.pushnotificationsettings.impl"
}
dependencies {
/** Api */
implementation(projects.features.pushNotificationSettings.api)
/** Core modules */
implementation(projects.core.configToggles)
/** Compose */
implementation(deps.compose.runtime)
/** DI */
implementation(deps.hilt.android)
kapt(deps.hilt.kapt)
}

View file

@ -0,0 +1,12 @@
package com.tangem.features.pushnotificationsettings
import com.tangem.core.configtoggle.FeatureToggles
import com.tangem.core.configtoggle.feature.FeatureTogglesManager
internal class DefaultPushNotificationSettingsFeatureToggles(
private val featureTogglesManager: FeatureTogglesManager,
) : PushNotificationSettingsFeatureToggles {
override val isPushNotificationSettingsEnabled: Boolean
get() = featureTogglesManager.isFeatureEnabled(FeatureToggles.TWI_1403_PUSH_NOTIFICATION_SETTINGS_ENABLED)
}

View file

@ -0,0 +1,23 @@
package com.tangem.features.pushnotificationsettings.di
import com.tangem.core.configtoggle.feature.FeatureTogglesManager
import com.tangem.features.pushnotificationsettings.DefaultPushNotificationSettingsFeatureToggles
import com.tangem.features.pushnotificationsettings.PushNotificationSettingsFeatureToggles
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 PushNotificationSettingsFeatureModule {
@Provides
@Singleton
fun providePushNotificationSettingsFeatureToggles(
featureTogglesManager: FeatureTogglesManager,
): PushNotificationSettingsFeatureToggles {
return DefaultPushNotificationSettingsFeatureToggles(featureTogglesManager)
}
}