don't load first message in collapsed thread before displaying summary, r=asuth, sr=standard8, 495304

This commit is contained in:
David Bienvenu 2009-06-02 14:29:22 -07:00
Родитель e2eb62d3bf
Коммит 1233c40440
8 изменённых файлов: 19 добавлений и 15 удалений

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

@ -527,7 +527,7 @@ nsMsgSearchCommandUpdater.prototype =
SetNextMessageAfterDelete();
},
summarizeSelection : function() {},
summarizeSelection : function() {return false},
QueryInterface : function(iid)
{

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

@ -188,7 +188,7 @@ nsMsgDBViewCommandUpdater.prototype =
SetNextMessageAfterDelete();
},
summarizeSelection : function() {},
summarizeSelection : function() {return false},
QueryInterface : function(iid)
{

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

@ -121,12 +121,12 @@ nsMsgDBViewCommandUpdater.prototype =
let selectedMsgUris = GetSelectedMessages();
if (!selectedMsgUris || (selectedMsgUris.length == 1)) {
pickMessagePane("singlemessage");
return;
return false;
}
if (! gPrefBranch.getBoolPref("mail.operate_on_msgs_in_collapsed_threads")) {
ClearMessagePane();
return;
return false;
}
let firstThreadId = messenger.msgHdrFromURI(selectedMsgUris[0]).threadId;
@ -138,6 +138,7 @@ nsMsgDBViewCommandUpdater.prototype =
}
// must be just one thread.
summarizeThread(selectedMsgUris);
return true;
},
QueryInterface : function(iid)

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

@ -442,7 +442,9 @@ interface nsIMsgDBViewCommandUpdater : nsISupports
/**
* tell the front end that the selection has changed, and may need to be
* resummarized
* resummarized.
*
* @return true if we did summarize, false otherwise.
*/
void summarizeSelection();
boolean summarizeSelection();
};

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

@ -1045,8 +1045,14 @@ NS_IMETHODIMP nsMsgDBView::SelectionChanged()
if (!NonDummyMsgSelected(indices, numSelected))
commandsNeedDisablingBecauseOfSelection = PR_TRUE;
}
PRBool selectionSummarized = PR_FALSE;
// let the front-end adjust the message pane appropriately with either
// the message body, or a summary of the selection
if (mCommandUpdater)
mCommandUpdater->SummarizeSelection(&selectionSummarized);
// if only one item is selected then we want to display a message
if (numSelected == 1)
if (numSelected == 1 && !selectionSummarized)
{
PRInt32 startRange;
PRInt32 endRange;
@ -1073,11 +1079,6 @@ NS_IMETHODIMP nsMsgDBView::SelectionChanged()
m_currentlyDisplayedViewIndex = nsMsgViewIndex_None;
}
// let the front-end adjust the message pane appropriately with either
// the message body, or a summary of the selection
if (mCommandUpdater)
mCommandUpdater->SummarizeSelection();
// determine if we need to push command update notifications out to the UI or not.
// we need to push a command update notification iff, one of the following conditions are met

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

@ -184,7 +184,7 @@ nsMsgDBViewCommandUpdater.prototype =
SetNextMessageAfterDelete();
},
summarizeSelection: function() {},
summarizeSelection: function() {return false},
QueryInterface : function(iid)
{

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

@ -527,7 +527,7 @@ nsMsgSearchCommandUpdater.prototype =
SetNextMessageAfterDelete();
},
summarizeSelection: function() {},
summarizeSelection: function() {return false},
QueryInterface : function(iid)
{

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

@ -116,7 +116,7 @@ nsMsgDBViewCommandUpdater.prototype =
SetNextMessageAfterDelete();
},
summarizeSelection: function() {},
summarizeSelection: function() {return false},
QueryInterface : function(iid)
{