adding debug flag for enabling the new combined signup/choose server screen

This commit is contained in:
Adam Brown 2022-03-16 11:59:39 +00:00
parent b9934d7239
commit b439322776
3 changed files with 11 additions and 0 deletions

View File

@ -54,6 +54,11 @@ class DebugFeaturesStateFactory @Inject constructor(
key = DebugFeatureKeys.onboardingPersonalize,
factory = VectorFeatures::isOnboardingPersonalizeEnabled
),
createBooleanFeature(
label = "FTUE Personalize combined choose server",
key = DebugFeatureKeys.onboardingCombinedChooseServer,
factory = VectorFeatures::isOnboardingCombinedChooseServerEnabled
),
createBooleanFeature(
label = "Live location sharing",
key = DebugFeatureKeys.liveLocationSharing,

View File

@ -54,6 +54,9 @@ class DebugVectorFeatures(
override fun isOnboardingPersonalizeEnabled(): Boolean = read(DebugFeatureKeys.onboardingPersonalize)
?: vectorFeatures.isOnboardingPersonalizeEnabled()
override fun isOnboardingCombinedChooseServerEnabled(): Boolean = read(DebugFeatureKeys.onboardingCombinedChooseServer)
?: vectorFeatures.isOnboardingCombinedChooseServerEnabled()
override fun isLiveLocationEnabled(): Boolean = read(DebugFeatureKeys.liveLocationSharing)
?: vectorFeatures.isLiveLocationEnabled()
@ -109,5 +112,6 @@ object DebugFeatureKeys {
val onboardingSplashCarousel = booleanPreferencesKey("onboarding-splash-carousel")
val onboardingUseCase = booleanPreferencesKey("onbboarding-splash-carousel")
val onboardingPersonalize = booleanPreferencesKey("onbboarding-personalize")
val onboardingCombinedChooseServer = booleanPreferencesKey("onbboarding-combined-choose-server")
val liveLocationSharing = booleanPreferencesKey("live-location-sharing")
}

View File

@ -25,6 +25,7 @@ interface VectorFeatures {
fun isOnboardingSplashCarouselEnabled(): Boolean
fun isOnboardingUseCaseEnabled(): Boolean
fun isOnboardingPersonalizeEnabled(): Boolean
fun isOnboardingCombinedChooseServerEnabled(): Boolean
fun isLiveLocationEnabled(): Boolean
enum class OnboardingVariant {
@ -40,5 +41,6 @@ class DefaultVectorFeatures : VectorFeatures {
override fun isOnboardingSplashCarouselEnabled() = true
override fun isOnboardingUseCaseEnabled() = true
override fun isOnboardingPersonalizeEnabled() = false
override fun isOnboardingCombinedChooseServerEnabled() = false
override fun isLiveLocationEnabled(): Boolean = BuildConfig.ENABLE_LIVE_LOCATION_SHARING
}