fix for #7891. commit db after we mark a header read.

This commit is contained in:
sspitzer%netscape.com 1999-06-12 18:07:21 +00:00
parent 96255e3aef
commit 21c0e6686c

View File

@ -138,6 +138,17 @@ NS_IMETHODIMP nsNewsDatabase::MarkHdrRead(nsIMsgDBHdr *msgHdr, PRBool bRead,
// give parent class chance to update data structures
rv = nsMsgDatabase::MarkHdrRead(msgHdr, bRead, instigator);
// sspitzer:
// yes, it is expensive to commit every time here.
//
// if we crash (the horror!) before we commit, the user will
// lose all there mark as read changes.
//
// since committing every time is expensive if we mark a
// whole bunch of headers as read, we should commit after we are
// done marking.
Commit(kSessionCommit);
return rv;
}