For #10162: Set switch back to prev state when failed to enable/disable addon (#10164)

fennec/production
Simon Chae 4 years ago committed by GitHub
parent aa5a49ec54
commit f1559ed2da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -116,6 +116,7 @@ class InstalledAddonDetailsFragment : Fragment() {
runIfFragmentIsAttached {
switch.isClickable = true
view.remove_add_on.isEnabled = true
switch.setState(addon.isEnabled())
showSnackBar(
view,
getString(
@ -149,6 +150,7 @@ class InstalledAddonDetailsFragment : Fragment() {
runIfFragmentIsAttached {
switch.isClickable = true
view.remove_add_on.isEnabled = true
switch.setState(addon.isEnabled())
showSnackBar(
view,
getString(
@ -230,6 +232,7 @@ class InstalledAddonDetailsFragment : Fragment() {
}
},
onError = {
switch.isChecked = addon.isAllowedInPrivateBrowsing()
runIfFragmentIsAttached {
switch.isClickable = true
view.remove_add_on.isEnabled = true

Loading…
Cancel
Save