Bug 1774455 - Fix Quick Filter sort in threaded views sorted by Order Received ascending. r=mkmelin

Differential Revision: https://phabricator.services.mozilla.com/D219911

--HG--
extra : rebase_source : 57a5618b01d9c3ec05ecc06da24cbfed47d034a7
This commit is contained in:
welpy-cw 2024-08-24 11:58:49 +00:00
Родитель 8c1fc6569d
Коммит 711e05a96e
1 изменённых файлов: 6 добавлений и 8 удалений

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

@ -482,15 +482,13 @@ nsresult nsMsgQuickSearchDBView::SortThreads(
}
}
// Need to sort the top level threads now by sort order, even if it's by id
// and ascending (which is the order per above), to ensure certain side
// effects of nsMsgDBView::Sort().
m_sortType = nsMsgViewSortType::byNone; // sort from scratch
// need to sort the top level threads now by sort order, if it's not by id
// and ascending (which is the order per above).
if (!(sortType == nsMsgViewSortType::byId &&
sortOrder == nsMsgViewSortOrder::ascending)) {
m_keys.SwapElements(threadRootIds);
nsMsgDBView::Sort(sortType, sortOrder);
threadRootIds.SwapElements(m_keys);
}
m_keys.SwapElements(threadRootIds);
nsMsgDBView::Sort(sortType, sortOrder);
threadRootIds.SwapElements(m_keys);
m_keys.Clear();
m_levels.Clear();
m_flags.Clear();