fix expanding imap folders when not using subscription by sending a performExpand notification r=jminta, 472129
authorDavid Bienvenu <bienvenu@nventure.com>
Fri, 27 Feb 2009 16:20:17 -0800
changeset 2098 7ea34ef19dc4b477e46df0c685a385a374f759f4
parent 2097 fc5d30f098e36cbc41bee332ab7716b38ea89925
child 2099 27f99cb40434b8f69fd228824de7819ba0ea0f2f
push id1695
push userbienvenu@nventure.com
push dateSat, 28 Feb 2009 00:20:11 +0000
treeherdercomm-central@7ea34ef19dc4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjminta, 472129
bugs472129
fix expanding imap folders when not using subscription by sending a performExpand notification r=jminta, 472129
mail/base/content/folderPane.js
--- a/mail/base/content/folderPane.js
+++ b/mail/base/content/folderPane.js
@@ -691,18 +691,22 @@ let gFolderTreeView = {
       if (this._persistOpenMap[this.mode].indexOf(id) == -1)
         this._persistOpenMap[this.mode].push(id);
 
       // Notify the tree of changes
       if (this._tree)
         this._tree.rowCountChanged(aIndex + 1, this._rowMap.length - oldCount);
       // if this was a server that was expanded, let it update its counts
       let folder = this._rowMap[aIndex]._folder;
-      if (aExpandServer && folder.isServer)
-        folder.server.performExpand(msgWindow);
+      if (aExpandServer) {
+        if (folder.isServer)
+          folder.server.performExpand(msgWindow);
+        else if (folder instanceof Components.interfaces.nsIMsgImapMailFolder)
+          folder.performExpand(msgWindow);
+      }
     }
   },
 
   // We don't implement any of these at the moment
   performAction: function ftv_performAction(aAction) {},
   performActionOnCell: function ftv_performActionOnCell(aAction, aRow, aCol) {},
   performActionOnRow: function ftv_performActionOnRow(aAction, aRow) {},
   selectionChanged: function ftv_selectionChanged() {},