2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-02 03:40:16 +00:00

For #21574: disabled the homescreen onboarding dialog.

(cherry picked from commit 7e3a2ba89d)
This commit is contained in:
Arturo Mejia 2021-10-05 17:18:11 -04:00
parent b1453028df
commit 62118be809
4 changed files with 14 additions and 5 deletions

View File

@ -12,7 +12,7 @@
"value": { "value": {
"sections-enabled": { "sections-enabled": {
"topSites": true, "topSites": true,
"recentExplorations": true, "recentExplorations": false,
"recentlySaved": false, "recentlySaved": false,
"jumpBackIn": false, "jumpBackIn": false,
"pocket": false "pocket": false

View File

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

View File

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

View File

@ -178,6 +178,7 @@ class DefaultSessionControlControllerTest {
} }
@Test @Test
@Ignore("Until the feature is enabled again")
fun handleShowOnboardingDialog() { fun handleShowOnboardingDialog() {
createController().handleShowOnboardingDialog() createController().handleShowOnboardingDialog()