Bug 1467138 - Fix disable/enable extensions from Fennec about:addons page. draft
authorLuca Greco <lgreco@mozilla.com>
Wed, 06 Jun 2018 20:42:20 +0200
changeset 804908 467b63d7092b0bab21a71c287a3f48f930d96352
parent 804864 04cc917f68c5d554e5b9542cb3745c9453bba58d
push id112490
push userluca.greco@alcacoop.it
push dateWed, 06 Jun 2018 18:43:27 +0000
bugs1467138, 1461146
milestone62.0a1
Bug 1467138 - Fix disable/enable extensions from Fennec about:addons page. This patch fixes a regression introduced by Bug 1461146 ("Replace Addon.userDisabled setter with async enable()/disable() methods"). MozReview-Commit-ID: 3VDhMaXxENp
mobile/android/chrome/content/aboutAddons.js
--- a/mobile/android/chrome/content/aboutAddons.js
+++ b/mobile/android/chrome/content/aboutAddons.js
@@ -516,19 +516,19 @@ var Addons = {
     let addon = aAddon || detailItem.addon;
     if (!addon)
       return;
 
     let listItem = this._getElementForAddon(addon.id);
 
     function setDisabled(addon, value) {
       if (value) {
-        return addon.enable();
+        return addon.disable();
       }
-      return addon.disable();
+      return addon.enable();
     }
 
     let opType;
     if (addon.type == "theme") {
       if (aValue) {
         // We can have only one theme enabled, so disable the current one if any
         let list = document.getElementById("addons-list");
         let item = list.firstElementChild;