mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-25 19:05:56 +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
|
factory = VectorFeatures::isOnboardingPersonalizeEnabled
|
||||||
),
|
),
|
||||||
createBooleanFeature(
|
createBooleanFeature(
|
||||||
label = "FTUE Combined sign up",
|
label = "FTUE Combined register",
|
||||||
key = DebugFeatureKeys.onboardingCombinedChooseServer,
|
key = DebugFeatureKeys.onboardingCombinedRegister,
|
||||||
factory = VectorFeatures::isOnboardingCombinedChooseServerEnabled
|
factory = VectorFeatures::isOnboardingCombinedRegisterEnabled
|
||||||
),
|
),
|
||||||
createBooleanFeature(
|
createBooleanFeature(
|
||||||
label = "Live location sharing",
|
label = "Live location sharing",
|
||||||
|
|
|
@ -54,8 +54,8 @@ class DebugVectorFeatures(
|
||||||
override fun isOnboardingPersonalizeEnabled(): Boolean = read(DebugFeatureKeys.onboardingPersonalize)
|
override fun isOnboardingPersonalizeEnabled(): Boolean = read(DebugFeatureKeys.onboardingPersonalize)
|
||||||
?: vectorFeatures.isOnboardingPersonalizeEnabled()
|
?: vectorFeatures.isOnboardingPersonalizeEnabled()
|
||||||
|
|
||||||
override fun isOnboardingCombinedChooseServerEnabled(): Boolean = read(DebugFeatureKeys.onboardingCombinedChooseServer)
|
override fun isOnboardingCombinedRegisterEnabled(): Boolean = read(DebugFeatureKeys.onboardingCombinedRegister)
|
||||||
?: vectorFeatures.isOnboardingCombinedChooseServerEnabled()
|
?: vectorFeatures.isOnboardingCombinedRegisterEnabled()
|
||||||
|
|
||||||
override fun isLiveLocationEnabled(): Boolean = read(DebugFeatureKeys.liveLocationSharing)
|
override fun isLiveLocationEnabled(): Boolean = read(DebugFeatureKeys.liveLocationSharing)
|
||||||
?: vectorFeatures.isLiveLocationEnabled()
|
?: vectorFeatures.isLiveLocationEnabled()
|
||||||
|
@ -112,6 +112,6 @@ object DebugFeatureKeys {
|
||||||
val onboardingSplashCarousel = booleanPreferencesKey("onboarding-splash-carousel")
|
val onboardingSplashCarousel = booleanPreferencesKey("onboarding-splash-carousel")
|
||||||
val onboardingUseCase = booleanPreferencesKey("onboarding-splash-carousel")
|
val onboardingUseCase = booleanPreferencesKey("onboarding-splash-carousel")
|
||||||
val onboardingPersonalize = booleanPreferencesKey("onboarding-personalize")
|
val onboardingPersonalize = booleanPreferencesKey("onboarding-personalize")
|
||||||
val onboardingCombinedChooseServer = booleanPreferencesKey("onboarding-combined-choose-server")
|
val onboardingCombinedRegister = booleanPreferencesKey("onboarding-combined-register")
|
||||||
val liveLocationSharing = booleanPreferencesKey("live-location-sharing")
|
val liveLocationSharing = booleanPreferencesKey("live-location-sharing")
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ interface VectorFeatures {
|
||||||
fun isOnboardingSplashCarouselEnabled(): Boolean
|
fun isOnboardingSplashCarouselEnabled(): Boolean
|
||||||
fun isOnboardingUseCaseEnabled(): Boolean
|
fun isOnboardingUseCaseEnabled(): Boolean
|
||||||
fun isOnboardingPersonalizeEnabled(): Boolean
|
fun isOnboardingPersonalizeEnabled(): Boolean
|
||||||
fun isOnboardingCombinedChooseServerEnabled(): Boolean
|
fun isOnboardingCombinedRegisterEnabled(): Boolean
|
||||||
fun isLiveLocationEnabled(): Boolean
|
fun isLiveLocationEnabled(): Boolean
|
||||||
|
|
||||||
enum class OnboardingVariant {
|
enum class OnboardingVariant {
|
||||||
|
@ -41,6 +41,6 @@ class DefaultVectorFeatures : VectorFeatures {
|
||||||
override fun isOnboardingSplashCarouselEnabled() = true
|
override fun isOnboardingSplashCarouselEnabled() = true
|
||||||
override fun isOnboardingUseCaseEnabled() = true
|
override fun isOnboardingUseCaseEnabled() = true
|
||||||
override fun isOnboardingPersonalizeEnabled() = false
|
override fun isOnboardingPersonalizeEnabled() = false
|
||||||
override fun isOnboardingCombinedChooseServerEnabled() = false
|
override fun isOnboardingCombinedRegisterEnabled() = false
|
||||||
override fun isLiveLocationEnabled(): Boolean = BuildConfig.ENABLE_LIVE_LOCATION_SHARING
|
override fun isLiveLocationEnabled(): Boolean = BuildConfig.ENABLE_LIVE_LOCATION_SHARING
|
||||||
}
|
}
|
||||||
|
|
|
@ -357,7 +357,7 @@ class OnboardingViewModel @AssistedInject constructor(
|
||||||
|
|
||||||
private fun handleUpdateUseCase(action: OnboardingAction.UpdateUseCase) {
|
private fun handleUpdateUseCase(action: OnboardingAction.UpdateUseCase) {
|
||||||
setState { copy(useCase = action.useCase) }
|
setState { copy(useCase = action.useCase) }
|
||||||
when (vectorFeatures.isOnboardingCombinedChooseServerEnabled()) {
|
when (vectorFeatures.isOnboardingCombinedRegisterEnabled()) {
|
||||||
true -> {
|
true -> {
|
||||||
handle(OnboardingAction.UpdateHomeServer(matrixOrgUrl))
|
handle(OnboardingAction.UpdateHomeServer(matrixOrgUrl))
|
||||||
OnboardingViewEvents.OpenCombinedRegister
|
OnboardingViewEvents.OpenCombinedRegister
|
||||||
|
|
|
@ -137,7 +137,7 @@ class FtueAuthVariant(
|
||||||
// Go on with registration flow
|
// Go on with registration flow
|
||||||
handleRegistrationNavigation(viewEvents.flowResult)
|
handleRegistrationNavigation(viewEvents.flowResult)
|
||||||
} else {
|
} else {
|
||||||
if (vectorFeatures.isOnboardingCombinedChooseServerEnabled()) {
|
if (vectorFeatures.isOnboardingCombinedRegisterEnabled()) {
|
||||||
openCombinedRegister()
|
openCombinedRegister()
|
||||||
} else {
|
} else {
|
||||||
// First ask for login and password
|
// First ask for login and password
|
||||||
|
|
Loading…
Reference in a new issue