For #21574: Move the homescreen onboarding card behind a feature flag

upstream-sync
Elise Richards 3 years ago committed by mergify[bot]
parent e72b7f7cc8
commit 02614eb889

@ -85,4 +85,9 @@ object FeatureFlags {
return Config.channel.isNightlyOrDebug &&
"en-US" == LocaleManager.getCurrentLocale(context)?.toLanguageTag() ?: getSystemDefault().toLanguageTag()
}
/**
* Enables showing the homescreen onboarding card.
*/
val showHomeOnboarding = Config.channel.isDebug
}

@ -27,6 +27,7 @@ import mozilla.components.feature.top.sites.TopSite
import mozilla.components.support.ktx.android.view.showKeyboard
import mozilla.components.support.ktx.kotlin.isUrl
import org.mozilla.fenix.BrowserDirection
import org.mozilla.fenix.FeatureFlags
import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.R
import org.mozilla.fenix.browser.BrowserFragmentDirections
@ -454,10 +455,12 @@ class DefaultSessionControlController(
}
override fun handleShowOnboardingDialog() {
navController.nav(
R.id.homeFragment,
HomeFragmentDirections.actionGlobalHomeOnboardingDialog()
)
if (FeatureFlags.showHomeOnboarding) {
navController.nav(
R.id.homeFragment,
HomeFragmentDirections.actionGlobalHomeOnboardingDialog()
)
}
}
override fun handleReadPrivacyNoticeClicked() {

@ -255,6 +255,8 @@
<string name="search_engine_suggestions_title">Search %s</string>
<!-- Search engine suggestion description text -->
<string name="search_engine_suggestions_description">Search directly from the address bar</string>
<!-- Home onboarding -->
<!-- Onboarding home screen dialog title text. Firefox is intentionally hardcoded. -->
<string name="onboarding_home_screen_title">Whats new in Firefox!</string>
<!-- Onboarding home screen dialog description text. -->

Loading…
Cancel
Save