Bug 1210071 - Fix folder contextmenu regression in Bug 236667. r=mkmelin
authoralta88
Wed, 30 Sep 2015 12:35:45 -0600
changeset 18477 dd8c1bf3c8aa091094a7afcd3e6f4e02118ab56f
parent 18476 34aa79c759051f4a26485e10364d04d1577e40c2
child 18478 2c1191c81f3885c2fa605a5e8eebf0be3c40192c
push id11308
push useraleth@instantbird.org
push dateFri, 02 Oct 2015 22:40:38 +0000
treeherdercomm-central@258f0a389e63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin
bugs1210071, 236667
Bug 1210071 - Fix folder contextmenu regression in Bug 236667. r=mkmelin
mail/base/content/mailContextMenus.js
--- a/mail/base/content/mailContextMenus.js
+++ b/mail/base/content/mailContextMenus.js
@@ -348,23 +348,27 @@ function fillFolderPaneContextMenu(aEven
   if (numSelected == 1)
     specialFolder = haveAnyVirtualFolders ? "Virtual" :
                                           getSpecialFolderString(folders[0]);
 
   function checkCanSubscribeToFolder(folder) {
     if (checkIsVirtualFolder(folder))
       return false;
 
+    // All feed account folders, besides Trash, are subscribable.
+    if (folder.server.type == "rss" &&
+        !(folder.flags & nsMsgFolderFlags.Trash))
+      return true;
+
     // We only want the subscribe item on the account nodes.
     if (!folder.isServer)
       return false;
 
     return folder.server.type == "nntp" ||
-           folder.server.type == "imap" ||
-           folder.server.type == "rss";
+           folder.server.type == "imap";
   }
   var haveOnlySubscribableFolders = folders.every(checkCanSubscribeToFolder);
 
   function checkIsNewsgroup(folder) {
     return !folder.isServer && folder.server.type == "nntp" &&
            !folder.getFlag(nsMsgFolderFlags.Virtual);
   }
   var haveOnlyNewsgroups = folders.every(checkIsNewsgroup);