diff --git a/layout/xul/base/src/tree/src/nsTreeColFrame.cpp b/layout/xul/base/src/tree/src/nsTreeColFrame.cpp index 1825c8451c5d..d52be3ef4f2e 100644 --- a/layout/xul/base/src/tree/src/nsTreeColFrame.cpp +++ b/layout/xul/base/src/tree/src/nsTreeColFrame.cpp @@ -191,7 +191,7 @@ nsTreeColFrame::AttributeChanged(nsIPresContext* aPresContext, EnsureTree(); if (mTree) mTree->Invalidate(); - } else if (aAttribute == nsXULAtoms::ordinal) { + } else if (aAttribute == nsXULAtoms::ordinal || aAttribute == nsXULAtoms::primary) { InvalidateColumnCache(aPresContext); } diff --git a/mailnews/base/resources/content/searchBar.js b/mailnews/base/resources/content/searchBar.js index b01cad6941fb..aa33069c0457 100644 --- a/mailnews/base/resources/content/searchBar.js +++ b/mailnews/base/resources/content/searchBar.js @@ -208,8 +208,8 @@ function restorePreSearchView() if (sortType != gDBView.sortType || sortOrder != gDBView.sortOrder) { gDBView.sort(sortType, sortOrder); - UpdateSortIndicators(sortType, sortOrder); } + UpdateSortIndicators(sortType, sortOrder); gPreQuickSearchView = null; } diff --git a/mailnews/base/resources/content/threadPane.js b/mailnews/base/resources/content/threadPane.js index 39ef515a3396..cc8dfb4cf241 100644 --- a/mailnews/base/resources/content/threadPane.js +++ b/mailnews/base/resources/content/threadPane.js @@ -258,12 +258,22 @@ function MsgSortDescending() function UpdateSortIndicators(sortType, sortOrder) { - var colID = ConvertSortTypeToColumnID(sortType); - var sortedColumn; + // show the twisties if the view is threaded + var currCol = document.getElementById("subjectCol"); + var primary = (sortType == nsMsgViewSortType.byThread) && gDBView.supportsThreading; + currCol.setAttribute("primary", primary); + + // remove the sort indicator from all the columns + currCol = document.getElementById("threadCol"); + while (currCol) { + currCol.removeAttribute("sortDirection"); + currCol = currCol.nextSibling; + } // set the sort indicator on the column we are sorted by + var colID = ConvertSortTypeToColumnID(sortType); if (colID) { - sortedColumn = document.getElementById(colID); + var sortedColumn = document.getElementById(colID); if (sortedColumn) { if (sortOrder == nsMsgViewSortOrder.ascending) { sortedColumn.setAttribute("sortDirection","ascending"); @@ -271,15 +281,6 @@ function UpdateSortIndicators(sortType, sortOrder) else { sortedColumn.setAttribute("sortDirection","descending"); } - - // remove the sort indicator from all the columns - // except the one we are sorted by - var currCol = sortedColumn.parentNode.firstChild; - while (currCol) { - if (currCol != sortedColumn && currCol.localName == "treecol") - currCol.removeAttribute("sortDirection"); - currCol = currCol.nextSibling; - } } } } diff --git a/mailnews/base/resources/content/threadPane.xul b/mailnews/base/resources/content/threadPane.xul index 77f4419b6414..2c7357cfbc31 100644 --- a/mailnews/base/resources/content/threadPane.xul +++ b/mailnews/base/resources/content/threadPane.xul @@ -36,7 +36,7 @@ Rights Reserved. onselect="ThreadPaneSelectionChanged();"> - +