Bug 1572827 - Stop overriding sort function for list of themes. r=mkmelin a=jorgk
authorGeoff Lankow <geoff@darktrojan.net>
Wed, 14 Aug 2019 12:21:23 +1200
changeset 35299 b12c70add56bdfaa5d83689db7bd97940ba27b35
parent 35298 dee1c54bac6b6984ca8bb4ec84d038bf89b8f393
child 35300 f0ec578d1c07ac3a724a4574546347edd62c4423
push id2479
push usermozilla@jorgk.com
push dateThu, 15 Aug 2019 13:18:53 +0000
treeherdercomm-beta@f0ec578d1c07 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin, jorgk
bugs1572827
Bug 1572827 - Stop overriding sort function for list of themes. r=mkmelin a=jorgk
mail/base/content/aboutAddonsExtra.js
--- a/mail/base/content/aboutAddonsExtra.js
+++ b/mail/base/content/aboutAddonsExtra.js
@@ -72,18 +72,22 @@ gStrings.mailExt =
   alert.appendChild(description);
   alertContainer.appendChild(alert);
 
   gListView.node.insertBefore(alertContainer, document.getElementById("legacy-extensions-notice"));
 })();
 
 window._oldSortElements = window.sortElements;
 window.sortElements = function(aElements, aSortBy, aAscending) {
-  if (aSortBy.length != 2 || aSortBy[0] != "uiState" || aSortBy[1] != "name") {
+  if (gListView._type != "extension" ||
+      aSortBy.length != 2 ||
+      aSortBy[0] != "uiState" ||
+      aSortBy[1] != "name") {
     window._oldSortElements(aElements, aSortBy, aAscending);
+    return;
   }
 
   let getUIState = function(addon) {
     if (addon.pendingOperations == AddonManager.PENDING_DISABLE) {
       return "pendingDisable";
     }
     if (ExtensionSupport.loadedLegacyExtensions.has(addon.id) && addon.userDisabled) {
       return "pendingDisable";