fix problem with threads with unread msgs only view where unread header gets added to thread not in view, and ends up with collapsed bit set in db, r=naving, sr=sspitzer 123858

This commit is contained in:
bienvenu%netscape.com 2002-05-16 14:23:17 +00:00
Родитель cfd916fc27
Коммит 26176e88af
1 изменённых файлов: 5 добавлений и 10 удалений

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

@ -78,21 +78,16 @@ nsresult nsMsgThreadsWithUnreadDBView::AddMsgToThreadNotInView(nsIMsgThread *thr
nsCOMPtr <nsIMsgDBHdr> parentHdr;
PRUint32 msgFlags;
PRUint32 newFlags;
msgHdr->GetFlags(&msgFlags);
GetFirstMessageHdrToDisplayInThread(threadHdr, getter_AddRefs(parentHdr));
if (parentHdr && (ensureListed || !(msgFlags & MSG_FLAG_READ)))
{
PRUint32 orFlags = MSG_VIEW_FLAG_ISTHREAD;
PRUint32 numChildren;
threadHdr->GetNumChildren(&numChildren);
if (numChildren > 1)
orFlags |= MSG_VIEW_FLAG_HASCHILDREN;
parentHdr->OrFlags(orFlags, &newFlags);
if (!(m_viewFlags & nsMsgViewFlagsType::kUnreadOnly))
parentHdr->OrFlags(MSG_FLAG_ELIDED, &newFlags);
nsMsgKey key;
rv = AddHdr(parentHdr);
parentHdr->GetMessageKey(&key);
nsMsgViewIndex viewIndex = FindViewIndex(key);
if (viewIndex != nsMsgViewIndex_None)
OrExtraFlag(viewIndex, MSG_FLAG_ELIDED | MSG_VIEW_FLAG_HASCHILDREN);
}
return rv;
}