Bug 1496375 - Update the blocker category states when the content blocking pref value changes r=johannh

Differential Revision: https://phabricator.services.mozilla.com/D8245
This commit is contained in:
Ehsan Akhgari
2018-10-11 09:51:55 +00:00
parent 3dfc3a8664
commit 88007442aa

View File

@@ -345,6 +345,11 @@ var ContentBlocking = {
this.appMenuButton.setAttribute("enabled", this.enabled);
this.appMenuButton.setAttribute("aria-pressed", this.enabled);
}
// The enabled state of blockers may also change since it depends on this.enabled.
for (let blocker of this.blockers) {
blocker.categoryItem.classList.toggle("blocked", this.enabled && blocker.enabled);
}
},
updateUIEnabled() {