зеркало из https://github.com/mozilla/gecko-dev.git
fix for #74354. on a new header, force the row for the parent thread to update.
sr=bienvenu
This commit is contained in:
Родитель
7f9f62f103
Коммит
1f21bcf863
|
@ -440,23 +440,26 @@ nsresult nsMsgThreadedDBView::OnNewHeader(nsMsgKey newKey, nsMsgKey aParentKey,
|
||||||
// top of thread, change the keys array.
|
// top of thread, change the keys array.
|
||||||
nsMsgViewIndex insertIndex = GetInsertIndex(msgHdr);
|
nsMsgViewIndex insertIndex = GetInsertIndex(msgHdr);
|
||||||
PRInt32 level = FindLevelInThread(msgHdr, insertIndex);
|
PRInt32 level = FindLevelInThread(msgHdr, insertIndex);
|
||||||
if ((flags & MSG_FLAG_ELIDED) && (level == 0)
|
if ((flags & MSG_FLAG_ELIDED)
|
||||||
&& (!(m_viewFlags & nsMsgViewFlagsType::kUnreadOnly) || !(msgFlags & MSG_FLAG_READ)))
|
&& (!(m_viewFlags & nsMsgViewFlagsType::kUnreadOnly) || !(msgFlags & MSG_FLAG_READ)))
|
||||||
{
|
{
|
||||||
nsMsgKey msgKey;
|
if (level == 0) {
|
||||||
msgHdr->GetMessageKey(&msgKey);
|
nsMsgKey msgKey;
|
||||||
m_keys.SetAt(threadIndex, msgKey);
|
msgHdr->GetMessageKey(&msgKey);
|
||||||
|
m_keys.SetAt(threadIndex, msgKey);
|
||||||
|
}
|
||||||
|
// note change, to update the parent thread's unread and total counts
|
||||||
NoteChange(threadIndex, 1, nsMsgViewNotificationCode::changed);
|
NoteChange(threadIndex, 1, nsMsgViewNotificationCode::changed);
|
||||||
}
|
}
|
||||||
if (! (flags & MSG_VIEW_FLAG_HASCHILDREN))
|
if (!(flags & MSG_VIEW_FLAG_HASCHILDREN))
|
||||||
{
|
{
|
||||||
flags |= MSG_VIEW_FLAG_HASCHILDREN | MSG_VIEW_FLAG_ISTHREAD;
|
flags |= MSG_VIEW_FLAG_HASCHILDREN | MSG_VIEW_FLAG_ISTHREAD;
|
||||||
if (!(m_viewFlags & nsMsgViewFlagsType::kUnreadOnly))
|
if (!(m_viewFlags & nsMsgViewFlagsType::kUnreadOnly))
|
||||||
flags |= MSG_FLAG_ELIDED;
|
flags |= MSG_FLAG_ELIDED;
|
||||||
m_flags[threadIndex] = flags;
|
m_flags[threadIndex] = flags;
|
||||||
NoteChange(threadIndex, 1, nsMsgViewNotificationCode::changed);
|
NoteChange(threadIndex, 1, nsMsgViewNotificationCode::changed);
|
||||||
}
|
}
|
||||||
if (! (flags & MSG_FLAG_ELIDED)) // thread is expanded
|
if (!(flags & MSG_FLAG_ELIDED)) // thread is expanded
|
||||||
{ // insert child into thread
|
{ // insert child into thread
|
||||||
// levels of other hdrs may have changed!
|
// levels of other hdrs may have changed!
|
||||||
PRUint32 newFlags = msgFlags;
|
PRUint32 newFlags = msgFlags;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче