Commit 8a3fa281 authored by Alex Catarineu's avatar Alex Catarineu Committed by Matthew Finkel
Browse files

Bug 40058: Hide option for disallowing addon in private mode

parent fecb9e99
...@@ -112,7 +112,7 @@ class InstalledAddonDetailsFragment : Fragment() { ...@@ -112,7 +112,7 @@ class InstalledAddonDetailsFragment : Fragment() {
runIfFragmentIsAttached { runIfFragmentIsAttached {
this.addon = it this.addon = it
switch.isClickable = true switch.isClickable = true
privateBrowsingSwitch.isVisible = it.isEnabled() privateBrowsingSwitch.isVisible = false
privateBrowsingSwitch.isChecked = it.isAllowedInPrivateBrowsing() privateBrowsingSwitch.isChecked = it.isAllowedInPrivateBrowsing()
switch.setText(R.string.mozac_feature_addons_enabled) switch.setText(R.string.mozac_feature_addons_enabled)
view.settings.isVisible = shouldSettingsBeVisible() view.settings.isVisible = shouldSettingsBeVisible()
...@@ -230,7 +230,7 @@ class InstalledAddonDetailsFragment : Fragment() { ...@@ -230,7 +230,7 @@ class InstalledAddonDetailsFragment : Fragment() {
private fun bindAllowInPrivateBrowsingSwitch(view: View) { private fun bindAllowInPrivateBrowsingSwitch(view: View) {
val switch = view.allow_in_private_browsing_switch val switch = view.allow_in_private_browsing_switch
switch.isChecked = addon.isAllowedInPrivateBrowsing() switch.isChecked = addon.isAllowedInPrivateBrowsing()
switch.isVisible = addon.isEnabled() switch.isVisible = false
switch.setOnCheckedChangeListener { v, isChecked -> switch.setOnCheckedChangeListener { v, isChecked ->
val addonManager = v.context.components.addonManager val addonManager = v.context.components.addonManager
switch.isClickable = false switch.isClickable = false
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment