diff --git a/mail/base/content/messageDisplay.js b/mail/base/content/messageDisplay.js index 58385ce5a4..5b7b43d511 100644 --- a/mail/base/content/messageDisplay.js +++ b/mail/base/content/messageDisplay.js @@ -338,15 +338,10 @@ MessageDisplayWidget.prototype = { // figure out if we're looking at one thread or more than one thread let selectedMessages = this.folderDisplay.selectedMessages; - let selectedIndices = this.folderDisplay.selectedIndices; - let dbView = this.folderDisplay.view.dbView; - let firstThreadId = dbView.getThreadContainingIndex(selectedIndices[0]) - .getChildHdrAt(0).messageKey; + let firstThreadId = selectedMessages[0].threadId; let oneThread = true; - for (let i = 0; i < selectedIndices.length; i++) { - let threadId = dbView.getThreadContainingIndex(selectedIndices[i]) - .getChildHdrAt(0).messageKey; - if (threadId != firstThreadId) { + for (let i = 0; i < selectedMessages.length; i++) { + if (selectedMessages[i].threadId != firstThreadId) { oneThread = false; break; }