зеркало из https://github.com/mozilla/pjs.git
fix mark thread watched/ignored news filter actions r=cavin, sr=sspitzer
This commit is contained in:
Родитель
ebc2116e2e
Коммит
aacca6bbd0
|
@ -148,13 +148,17 @@ nsresult nsMsgWatchedThreadsWithUnreadDBView::AddMsgToThreadNotInView(nsIMsgThre
|
|||
GetFirstMessageHdrToDisplayInThread(threadHdr, getter_AddRefs(parentHdr));
|
||||
if (parentHdr && (ensureListed || !(msgFlags & MSG_FLAG_READ)))
|
||||
{
|
||||
PRUint32 orFlags = MSG_VIEW_FLAG_ISTHREAD | MSG_FLAG_ELIDED;
|
||||
PRUint32 numChildren;
|
||||
threadHdr->GetNumChildren(&numChildren);
|
||||
if (numChildren > 1)
|
||||
orFlags |= MSG_VIEW_FLAG_HASCHILDREN;
|
||||
parentHdr->OrFlags(orFlags, &newFlags);
|
||||
rv = AddHdr(parentHdr);
|
||||
if (numChildren > 1)
|
||||
{
|
||||
nsMsgKey key;
|
||||
parentHdr->GetMessageKey(&key);
|
||||
nsMsgViewIndex viewIndex = FindViewIndex(key);
|
||||
if (viewIndex != nsMsgViewIndex_None)
|
||||
OrExtraFlag(viewIndex, MSG_FLAG_ELIDED | MSG_VIEW_FLAG_ISTHREAD | MSG_VIEW_FLAG_HASCHILDREN | MSG_FLAG_WATCHED);
|
||||
}
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
|
|
|
@ -256,6 +256,13 @@ NS_IMETHODIMP nsMsgThread::AddChild(nsIMsgDBHdr *child, nsIMsgDBHdr *inReplyTo,
|
|||
hdr->GetFlags(&newHdrFlags);
|
||||
hdr->GetMessageKey(&newHdrKey);
|
||||
|
||||
if (newHdrFlags & MSG_FLAG_IGNORED)
|
||||
SetFlags(m_flags | MSG_FLAG_IGNORED);
|
||||
|
||||
if (newHdrFlags & MSG_FLAG_WATCHED)
|
||||
SetFlags(m_flags | MSG_FLAG_WATCHED);
|
||||
|
||||
child->AndFlags(~(MSG_FLAG_WATCHED | MSG_FLAG_IGNORED), &newHdrFlags);
|
||||
PRUint32 numChildren;
|
||||
PRUint32 childIndex = 0;
|
||||
|
||||
|
@ -998,7 +1005,7 @@ nsresult nsMsgThread::ChangeUnreadChildCount(PRInt32 delta)
|
|||
childCount += delta;
|
||||
if ((PRInt32) childCount < 0)
|
||||
{
|
||||
#ifdef DEBUG_bienvenu
|
||||
#ifdef DEBUG_bienvenu1
|
||||
NS_ASSERTION(PR_FALSE, "negative unread child count");
|
||||
#endif
|
||||
childCount = 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче