fix for #74808. when setting a "new" message as "read", it should

properly update in the message pane.  sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@91436 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
sspitzer%netscape.com
2001-04-05 07:13:16 +00:00
parent c1b4abfdf5
commit 6e3cec28fc

View File

@@ -1600,10 +1600,20 @@ nsresult nsMsgDBView::SetReadByIndex(nsMsgViewIndex index, PRBool read)
if (!IsValidIndex(index))
return NS_MSG_INVALID_DBVIEW_INDEX;
if (read)
if (read) {
OrExtraFlag(index, MSG_FLAG_READ);
else
// MarkRead() will clear this flag in the db
// and then call OnKeyChange(), but
// because we are the instigator of the change
// we'll ignore the change.
//
// so we need to clear it in m_flags
// to keep the db and m_flags in sync
AndExtraFlag(index, ~MSG_FLAG_NEW);
}
else {
AndExtraFlag(index, ~MSG_FLAG_READ);
}
nsCOMPtr <nsIMsgDatabase> dbToUse;
rv = GetDBForViewIndex(index, getter_AddRefs(dbToUse));