mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-29 06:28:45 +03:00
updating feature flag name to match feature name in other places
This commit is contained in:
parent
13fb4e52af
commit
5120e7a8c6
5 changed files with 10 additions and 10 deletions
|
@ -55,9 +55,9 @@ class DebugFeaturesStateFactory @Inject constructor(
|
|||
factory = VectorFeatures::isOnboardingPersonalizeEnabled
|
||||
),
|
||||
createBooleanFeature(
|
||||
label = "FTUE Combined sign up",
|
||||
key = DebugFeatureKeys.onboardingCombinedChooseServer,
|
||||
factory = VectorFeatures::isOnboardingCombinedChooseServerEnabled
|
||||
label = "FTUE Combined register",
|
||||
key = DebugFeatureKeys.onboardingCombinedRegister,
|
||||
factory = VectorFeatures::isOnboardingCombinedRegisterEnabled
|
||||
),
|
||||
createBooleanFeature(
|
||||
label = "Live location sharing",
|
||||
|
|
|
@ -54,8 +54,8 @@ class DebugVectorFeatures(
|
|||
override fun isOnboardingPersonalizeEnabled(): Boolean = read(DebugFeatureKeys.onboardingPersonalize)
|
||||
?: vectorFeatures.isOnboardingPersonalizeEnabled()
|
||||
|
||||
override fun isOnboardingCombinedChooseServerEnabled(): Boolean = read(DebugFeatureKeys.onboardingCombinedChooseServer)
|
||||
?: vectorFeatures.isOnboardingCombinedChooseServerEnabled()
|
||||
override fun isOnboardingCombinedRegisterEnabled(): Boolean = read(DebugFeatureKeys.onboardingCombinedRegister)
|
||||
?: vectorFeatures.isOnboardingCombinedRegisterEnabled()
|
||||
|
||||
override fun isLiveLocationEnabled(): Boolean = read(DebugFeatureKeys.liveLocationSharing)
|
||||
?: vectorFeatures.isLiveLocationEnabled()
|
||||
|
@ -112,6 +112,6 @@ object DebugFeatureKeys {
|
|||
val onboardingSplashCarousel = booleanPreferencesKey("onboarding-splash-carousel")
|
||||
val onboardingUseCase = booleanPreferencesKey("onboarding-splash-carousel")
|
||||
val onboardingPersonalize = booleanPreferencesKey("onboarding-personalize")
|
||||
val onboardingCombinedChooseServer = booleanPreferencesKey("onboarding-combined-choose-server")
|
||||
val onboardingCombinedRegister = booleanPreferencesKey("onboarding-combined-register")
|
||||
val liveLocationSharing = booleanPreferencesKey("live-location-sharing")
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ interface VectorFeatures {
|
|||
fun isOnboardingSplashCarouselEnabled(): Boolean
|
||||
fun isOnboardingUseCaseEnabled(): Boolean
|
||||
fun isOnboardingPersonalizeEnabled(): Boolean
|
||||
fun isOnboardingCombinedChooseServerEnabled(): Boolean
|
||||
fun isOnboardingCombinedRegisterEnabled(): Boolean
|
||||
fun isLiveLocationEnabled(): Boolean
|
||||
|
||||
enum class OnboardingVariant {
|
||||
|
@ -41,6 +41,6 @@ class DefaultVectorFeatures : VectorFeatures {
|
|||
override fun isOnboardingSplashCarouselEnabled() = true
|
||||
override fun isOnboardingUseCaseEnabled() = true
|
||||
override fun isOnboardingPersonalizeEnabled() = false
|
||||
override fun isOnboardingCombinedChooseServerEnabled() = false
|
||||
override fun isOnboardingCombinedRegisterEnabled() = false
|
||||
override fun isLiveLocationEnabled(): Boolean = BuildConfig.ENABLE_LIVE_LOCATION_SHARING
|
||||
}
|
||||
|
|
|
@ -357,7 +357,7 @@ class OnboardingViewModel @AssistedInject constructor(
|
|||
|
||||
private fun handleUpdateUseCase(action: OnboardingAction.UpdateUseCase) {
|
||||
setState { copy(useCase = action.useCase) }
|
||||
when (vectorFeatures.isOnboardingCombinedChooseServerEnabled()) {
|
||||
when (vectorFeatures.isOnboardingCombinedRegisterEnabled()) {
|
||||
true -> {
|
||||
handle(OnboardingAction.UpdateHomeServer(matrixOrgUrl))
|
||||
OnboardingViewEvents.OpenCombinedRegister
|
||||
|
|
|
@ -137,7 +137,7 @@ class FtueAuthVariant(
|
|||
// Go on with registration flow
|
||||
handleRegistrationNavigation(viewEvents.flowResult)
|
||||
} else {
|
||||
if (vectorFeatures.isOnboardingCombinedChooseServerEnabled()) {
|
||||
if (vectorFeatures.isOnboardingCombinedRegisterEnabled()) {
|
||||
openCombinedRegister()
|
||||
} else {
|
||||
// First ask for login and password
|
||||
|
|
Loading…
Reference in a new issue