Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Commit

Permalink
For #220 - Puts language picker behind a feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
boek committed Jan 16, 2020
1 parent 60e3bb3 commit 6789df5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions app/src/main/java/org/mozilla/fenix/FeatureFlags.kt
Expand Up @@ -53,4 +53,9 @@ object FeatureFlags {
* Disables FxA Application Services Pairing feature
*/
const val asFeatureFxAPairingDisabled = false

/**
* Enables the new language picker
*/
val fenixLanguagePicker = Config.channel.isNightlyOrDebug
}
Expand Up @@ -185,6 +185,10 @@ class SettingsFragment : PreferenceFragmentCompat() {
findPreference<Preference>(getPreferenceKey(pref_key_passwords))?.apply {
isVisible = FeatureFlags.logins
}

findPreference<PreferenceCategory>(getPreferenceKey(R.string.pref_key_advanced))?.apply {
isVisible = FeatureFlags.fenixLanguagePicker
}
}

@Suppress("ComplexMethod", "LongMethod")
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/preference_keys.xml
Expand Up @@ -14,6 +14,7 @@
<string name="pref_key_accessibility_auto_size" translatable="false">pref_key_accessibility_auto_size</string>
<string name="pref_key_accessibility_font_scale" translatable="false">pref_key_accessibility_font_scale</string>
<string name="pref_key_accessibility_force_enable_zoom" translatable="false">pref_key_accessibility_force_enable_zoom</string>
<string name="pref_key_advanced" translatable="false">pref_key_advanced</string>
<string name="pref_key_language" translatable="false">pref_key_language</string>
<string name="pref_key_data_choices" translatable="false">pref_key_data_choices</string>
<string name="pref_key_privacy_link" translatable="false">pref_key_privacy_link</string>
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/res/xml/preferences.xml
Expand Up @@ -103,7 +103,9 @@

<PreferenceCategory
android:title="@string/preferences_category_advanced"
app:iconSpaceReserved="false">
app:iconSpaceReserved="false"
android:key="@string/pref_key_advanced"
app:isPreferenceVisible="false">
<androidx.preference.Preference
android:icon="@drawable/ic_language"
android:key="@string/pref_key_language"
Expand Down

0 comments on commit 6789df5

Please sign in to comment.