bullet proof removing of rows when collapsing thread, bug 629487, r=standard8
This commit is contained in:
Родитель
095cc383e7
Коммит
40f25b3e0f
|
@ -5064,6 +5064,13 @@ nsresult nsMsgDBView::CollapseByIndex(nsMsgViewIndex index, PRUint32 *pNumCollap
|
|||
NoteChange(index, 1, nsMsgViewNotificationCode::changed);
|
||||
|
||||
PRInt32 numRemoved = -rowDelta; // don't count first header in thread
|
||||
if (index + 1 + numRemoved > m_keys.Length())
|
||||
{
|
||||
NS_ERROR("trying to remove too many rows");
|
||||
numRemoved -= (index + 1 + numRemoved) - m_keys.Length();
|
||||
if (numRemoved <= 0)
|
||||
return NS_MSG_MESSAGE_NOT_FOUND;
|
||||
}
|
||||
NoteStartChange(index + 1, rowDelta, nsMsgViewNotificationCode::insertOrDelete);
|
||||
// start at first id after thread.
|
||||
RemoveRows(index + 1, numRemoved);
|
||||
|
|
Загрузка…
Ссылка в новой задаче