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

properly update in the message pane.  sr=bienvenu
This commit is contained in:
sspitzer%netscape.com 2001-04-05 07:13:16 +00:00
Родитель 6d3aacc4ed
Коммит 320e4d5b79
1 изменённых файлов: 12 добавлений и 2 удалений

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

@ -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));