mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
add method to clear hdr cache on db (to be used when changing folders) r=naving, sr=sspitzer part of fix for 93013
This commit is contained in:
parent
d9dc0205f3
commit
f780098a4b
@ -116,6 +116,7 @@ interface nsIMsgDatabase : nsIDBChangeAnnouncer {
|
||||
// Force closed is evil, and we should see if we can do without it.
|
||||
// In 4.x, it was mainly used to remove corrupted databases.
|
||||
void ForceClosed();
|
||||
void clearCachedHdrs();
|
||||
|
||||
readonly attribute nsIDBFolderInfo dBFolderInfo;
|
||||
|
||||
|
@ -163,6 +163,11 @@ nsresult nsMsgDatabase::AddHdrToCache(nsIMsgDBHdr *hdr, nsMsgKey key) // do we w
|
||||
return PL_DHASH_NEXT;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsMsgDatabase::ClearCachedHdrs()
|
||||
{
|
||||
return ClearHdrCache(PR_FALSE); // don't re-init, hope db gets closed.
|
||||
}
|
||||
|
||||
nsresult nsMsgDatabase::ClearHdrCache(PRBool reInit)
|
||||
{
|
||||
if (m_cachedHeaders)
|
||||
|
Loading…
Reference in New Issue
Block a user