Updated on 2026-08-14
This commit is contained in:
parent
c2e8cb82a7
commit
c428dc5bf5
9 changed files with 148 additions and 0 deletions
9
features/push-notification-settings/api/build.gradle.kts
Normal file
9
features/push-notification-settings/api/build.gradle.kts
Normal 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"
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
package com.tangem.features.pushnotificationsettings
|
||||
|
||||
interface PushNotificationSettingsFeatureToggles {
|
||||
val isPushNotificationSettingsEnabled: Boolean
|
||||
}
|
||||
26
features/push-notification-settings/impl/build.gradle.kts
Normal file
26
features/push-notification-settings/impl/build.gradle.kts
Normal 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)
|
||||
}
|
||||
|
|
@ -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)
|
||||
}
|
||||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue