diff --git a/mail/base/content/commandglue.js b/mail/base/content/commandglue.js index e1452351305..e2aa3e9a8d4 100644 --- a/mail/base/content/commandglue.js +++ b/mail/base/content/commandglue.js @@ -377,26 +377,28 @@ function SwitchView(command) switch(command) { - case "cmd_viewUnreadMsgs": - - viewFlags = viewFlags | nsMsgViewFlagsType.kUnreadOnly; - CreateDBView(msgWindow.openFolder, nsMsgViewType.eShowAllThreads, viewFlags, - oldSortType, oldSortOrder ); - break; + // "All" threads and "Unread" threads don't change threading state case "cmd_viewAllMsgs": viewFlags = viewFlags & ~nsMsgViewFlagsType.kUnreadOnly; CreateDBView(msgWindow.openFolder, nsMsgViewType.eShowAllThreads, viewFlags, oldSortType, oldSortOrder); - break; + break; + case "cmd_viewUnreadMsgs": + viewFlags = viewFlags | nsMsgViewFlagsType.kUnreadOnly; + CreateDBView(msgWindow.openFolder, nsMsgViewType.eShowAllThreads, viewFlags, + oldSortType, oldSortOrder ); + break; + // "Threads with Unread" and "Watched Threads with Unread" force threading case "cmd_viewThreadsWithUnread": CreateDBView(msgWindow.openFolder, nsMsgViewType.eShowThreadsWithUnread, nsMsgViewFlagsType.kThreadedDisplay, - nsMsgViewSortType.byThread, oldSortOrder); - - break; + oldSortType, oldSortOrder); + break; case "cmd_viewWatchedThreadsWithUnread": CreateDBView(msgWindow.openFolder, nsMsgViewType.eShowWatchedThreadsWithUnread, nsMsgViewFlagsType.kThreadedDisplay, - nsMsgViewSortType.byThread, oldSortOrder); - break; + oldSortType, oldSortOrder); + break; + // "Ignored Threads" toggles 'ignored' inclusion -- + // but it also resets 'With Unread' views to 'All' case "cmd_viewIgnoredThreads": if (viewFlags & nsMsgViewFlagsType.kShowIgnored) viewFlags = viewFlags & ~nsMsgViewFlagsType.kShowIgnored; @@ -404,7 +406,7 @@ function SwitchView(command) viewFlags = viewFlags | nsMsgViewFlagsType.kShowIgnored; CreateDBView(msgWindow.openFolder, nsMsgViewType.eShowAllThreads, viewFlags, oldSortType, oldSortOrder); - break; + break; } RerootThreadPane();