Bug 1058195 - Properly listen for lightweight theme install/uninstall in about:addons. r=mfinkle
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Mon, 06 Oct 2014 10:00:03 -0400
changeset 232261 e06807007c5cfe939f8ccf727f9a96790f501ca9
parent 232260 23348a6110bdee34dfd03d8f95f8428ce1ba934c
child 232262 ffcadc8790bd560f48c23b9117379c59a2ec3312
push id4187
push userbhearsum@mozilla.com
push dateFri, 28 Nov 2014 15:29:12 +0000
treeherdermozilla-beta@f23cc6a30c11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs1058195
milestone35.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1058195 - Properly listen for lightweight theme install/uninstall in about:addons. r=mfinkle
mobile/android/chrome/content/aboutAddons.js
--- a/mobile/android/chrome/content/aboutAddons.js
+++ b/mobile/android/chrome/content/aboutAddons.js
@@ -522,16 +522,31 @@ var Addons = {
       element = this._createItemForAddon(aAddon);
       list.insertBefore(element, list.firstElementChild);
     }
 
     if (needsRestart)
       element.setAttribute("opType", "needs-restart");
   },
 
+  onInstalled: function(aAddon) {
+    let list = document.getElementById("addons-list");
+    let element = this._getElementForAddon(aAddon.id);
+    if (!element) {
+      element = this._createItemForAddon(aAddon);
+      list.insertBefore(element, list.firstElementChild);
+    }
+  },
+
+  onUninstalled: function(aAddon) {
+    let list = document.getElementById("addons-list");
+    let element = this._getElementForAddon(aAddon.id);
+    list.removeChild(element);
+  },
+
   onInstallFailed: function(aInstall) {
   },
 
   onDownloadProgress: function xpidm_onDownloadProgress(aInstall) {
   },
 
   onDownloadFailed: function(aInstall) {
   },