Fix bug 98183: Threaded view auto-changes to unthreaded view.

When no messages exist on the server, still set our internal "threaded"
flag.

r=hwarra, sr=sspitzer, a=blizzard on behalf of drivers for 0.9.9
This commit is contained in:
mhammond%skippinet.com.au 2002-02-27 00:40:23 +00:00
Родитель 06d9a7a120
Коммит 4dc3d4d658
1 изменённых файлов: 11 добавлений и 1 удалений

Просмотреть файл

@ -221,8 +221,18 @@ NS_IMETHODIMP nsMsgThreadedDBView::Sort(nsMsgViewSortTypeValue sortType, nsMsgVi
nsresult rv;
PRInt32 rowCountBeforeSort = GetSize();
if (!rowCountBeforeSort)
if (!rowCountBeforeSort) {
// still need to setup our flags even when no articles - bug 98183.
m_sortType = sortType;
if (sortType == nsMsgViewSortType::byThread)
m_viewFlags |= nsMsgViewFlagsType::kThreadedDisplay;
else
m_viewFlags &= ~nsMsgViewFlagsType::kThreadedDisplay;
SaveSortInfo(sortType, sortOrder);
return NS_OK;
}
nsMsgKeyArray preservedSelection;
SaveAndClearSelection(&preservedSelection);