Bug 1774177 - Fix open message in containing folder for standalone message windows. r=freaktechnik

Fix opening, and also prevent showing the menu item if it's a message opened from the file system.

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

--HG--
extra : rebase_source : 8d8225c8d8d8be023e44a58495d5262d8cc6a7a8
extra : amend_source : f1f9ed4e6bff7584f4e295f64d0a7aec1902d3c2
This commit is contained in:
Magnus Melin 2022-06-16 13:09:04 +03:00
Родитель d0cff993fa
Коммит 564413c126
3 изменённых файлов: 7 добавлений и 9 удалений

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

@ -2211,6 +2211,10 @@ function MsgMoveMessage(aDestFolder) {
Services.prefs.setBoolPref("mail.last_msg_movecopy_was_move", true);
}
function OpenContainingFolder() {
MailUtils.displayMessageInFolderTab(gMessageDisplay.displayedMessage);
}
/**
* Calls the ComposeMessage function with the desired type, and proper default
* based on the event that fired it.

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

@ -1864,14 +1864,6 @@ function OpenMessageInNewTab(msgHdr, tabParams = {}) {
}
}
function OpenContainingFolder() {
if (!gFolderDisplay.selectedMessage) {
return;
}
MailUtils.displayMessageInFolderTab(gFolderDisplay.selectedMessage);
}
function ThreadTreeOnClick(event) {
var threadTree = document.getElementById("threadTree");

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

@ -596,7 +596,9 @@ class nsContextMenu {
);
this.showItem(
"mailContext-openContainingFolder",
!gFolderDisplay.folderPaneVisible && this.numSelectedMessages == 1
!gFolderDisplay.folderPaneVisible &&
this.numSelectedMessages == 1 &&
!gMessageDisplay.isDummy
);
this.setSingleSelection("mailContext-replySender");