mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-25 15:08:12 +08:00
adding ftue personalize feature flag whilst under development
This commit is contained in:
parent
ef3baee35b
commit
9b12f295d1
@ -48,6 +48,11 @@ class DebugFeaturesStateFactory @Inject constructor(
|
||||
label = "FTUE Use Case",
|
||||
key = DebugFeatureKeys.onboardingUseCase,
|
||||
factory = VectorFeatures::isOnboardingUseCaseEnabled
|
||||
),
|
||||
createBooleanFeature(
|
||||
label = "FTUE Personalize profile",
|
||||
key = DebugFeatureKeys.onboardingPersonalize,
|
||||
factory = VectorFeatures::isOnboardingPersonalizeEnabled
|
||||
)
|
||||
))
|
||||
}
|
||||
|
@ -51,6 +51,9 @@ class DebugVectorFeatures(
|
||||
|
||||
override fun isOnboardingUseCaseEnabled(): Boolean = read(DebugFeatureKeys.onboardingUseCase) ?: vectorFeatures.isOnboardingUseCaseEnabled()
|
||||
|
||||
override fun isOnboardingPersonalizeEnabled(): Boolean = read(DebugFeatureKeys.onboardingPersonalize)
|
||||
?: vectorFeatures.isOnboardingPersonalizeEnabled()
|
||||
|
||||
fun <T> override(value: T?, key: Preferences.Key<T>) = updatePreferences {
|
||||
if (value == null) {
|
||||
it.remove(key)
|
||||
@ -102,4 +105,5 @@ object DebugFeatureKeys {
|
||||
val onboardingAlreadyHaveAnAccount = booleanPreferencesKey("onboarding-already-have-an-account")
|
||||
val onboardingSplashCarousel = booleanPreferencesKey("onboarding-splash-carousel")
|
||||
val onboardingUseCase = booleanPreferencesKey("onbboarding-splash-carousel")
|
||||
val onboardingPersonalize = booleanPreferencesKey("onbboarding-personalize")
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ interface VectorFeatures {
|
||||
fun isOnboardingAlreadyHaveAccountSplashEnabled(): Boolean
|
||||
fun isOnboardingSplashCarouselEnabled(): Boolean
|
||||
fun isOnboardingUseCaseEnabled(): Boolean
|
||||
fun isOnboardingPersonalizeEnabled(): Boolean
|
||||
|
||||
enum class OnboardingVariant {
|
||||
LEGACY,
|
||||
@ -37,4 +38,5 @@ class DefaultVectorFeatures : VectorFeatures {
|
||||
override fun isOnboardingAlreadyHaveAccountSplashEnabled() = true
|
||||
override fun isOnboardingSplashCarouselEnabled() = true
|
||||
override fun isOnboardingUseCaseEnabled() = true
|
||||
override fun isOnboardingPersonalizeEnabled() = false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user