rem: 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"); } 
context: function HandleColumnClick(columnID){  var sortType = ConvertColumnIDToSortType(columnID);  // if sortType is 0, this is an unsupported sort type  // return, since we can't sort by that column.  if (sortType == 0)    return;  var dbview = GetDBView();  var simpleColumns = false;  try {    simpleColumns = !pref.getBoolPref("mailnews.thread_pane_column_unthreads");  }  catch (ex) {  }  if (sortType == nsMsgViewSortType.byThread) {    if (!dbview.supportsThreading)      return;    if (simpleColumns)      MsgToggleThreaded();    else if (dbview.viewFlags & nsMsgViewFlagsType.kThreadedDisplay)      MsgReverseSortThreadPane();    else      MsgSortByThread();  }  else {    if (!simpleColumns && (dbview.viewFlags & nsMsgViewFlagsType.kThreadedDisplay)) {      var viewFlags = dbview.viewFlags;      dbview.viewFlags &= ~ (nsMsgViewFlagsType.kThreadedDisplay | nsMsgViewFlagsType.kGroupBySort);      if (viewFlags & nsMsgViewFlagsType.kGroupBySort)      {        dbview.sortType = sortType; // save sort in current view        viewDebug("switching view to all msgs\n");        return SwitchView("cmd_viewAllMsgs");      }      MsgSortThreadPane(sortType);    }    else if (dbview.sortType == sortType) {      MsgReverseSortThreadPane();    }    else {      MsgSortThreadPane(sortType);    }  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/6ba15b271f54502c90ed3b85c83eb0c4e63b0eec/threadPane.js/buggy/mailnews/base/resources/content/threadPane.js