mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-03 23:15:31 +00:00
[fenix] For https://github.com/mozilla-mobile/fenix/issues/10162: Set switch back to prev state when failed to enable/disable addon (https://github.com/mozilla-mobile/fenix/pull/10164)
This commit is contained in:
parent
2d00592f58
commit
f765736b27
@ -116,6 +116,7 @@ class InstalledAddonDetailsFragment : Fragment() {
|
|||||||
runIfFragmentIsAttached {
|
runIfFragmentIsAttached {
|
||||||
switch.isClickable = true
|
switch.isClickable = true
|
||||||
view.remove_add_on.isEnabled = true
|
view.remove_add_on.isEnabled = true
|
||||||
|
switch.setState(addon.isEnabled())
|
||||||
showSnackBar(
|
showSnackBar(
|
||||||
view,
|
view,
|
||||||
getString(
|
getString(
|
||||||
@ -149,6 +150,7 @@ class InstalledAddonDetailsFragment : Fragment() {
|
|||||||
runIfFragmentIsAttached {
|
runIfFragmentIsAttached {
|
||||||
switch.isClickable = true
|
switch.isClickable = true
|
||||||
view.remove_add_on.isEnabled = true
|
view.remove_add_on.isEnabled = true
|
||||||
|
switch.setState(addon.isEnabled())
|
||||||
showSnackBar(
|
showSnackBar(
|
||||||
view,
|
view,
|
||||||
getString(
|
getString(
|
||||||
@ -230,6 +232,7 @@ class InstalledAddonDetailsFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onError = {
|
onError = {
|
||||||
|
switch.isChecked = addon.isAllowedInPrivateBrowsing()
|
||||||
runIfFragmentIsAttached {
|
runIfFragmentIsAttached {
|
||||||
switch.isClickable = true
|
switch.isClickable = true
|
||||||
view.remove_add_on.isEnabled = true
|
view.remove_add_on.isEnabled = true
|
||||||
|
Loading…
Reference in New Issue
Block a user