rem: var dbview = GetDBView(); dbview.sort(sortType, nsMsgViewSortOrder.ascending); UpdateSortIndicators(sortType, nsMsgViewSortOrder.ascending); 
add: var dbview = GetDBView(); var viewFlags = dbview.viewFlags; dbview.viewFlags &= ~ (nsMsgViewFlagsType.kThreadedDisplay | nsMsgViewFlagsType.kGroupBySort); if (viewFlags & nsMsgViewFlagsType.kGroupBySort) { dbview.sortType = sortType; viewDebug("switching view to all msgs\n"); return SwitchView("cmd_viewAllMsgs"); } dbview.sort(sortType, nsMsgViewSortOrder.ascending); UpdateSortIndicators(sortType, nsMsgViewSortOrder.ascending); 
context: function MsgSortThreadPane(sortType){    var dbview = GetDBView();    dbview.sort(sortType, nsMsgViewSortOrder.ascending);    UpdateSortIndicators(sortType, nsMsgViewSortOrder.ascending);}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/8b85f3c0b5bcceae8502c2fb080a8de845324a9f/threadPane.js/clean/mailnews/base/resources/content/threadPane.js