fix saving of imap pending unread counts r=sspitzer,naving, sr=mscott 66580

This commit is contained in:
bienvenu%netscape.com 2001-01-26 00:14:10 +00:00
Родитель f4306438d3
Коммит a2a69a7ac1
1 изменённых файлов: 10 добавлений и 0 удалений

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

@ -1417,6 +1417,11 @@ void nsMsgFolder::ChangeNumPendingUnread(PRInt32 delta)
PRInt32 oldUnreadMessages = mNumUnreadMessages + mNumPendingUnreadMessages;
mNumPendingUnreadMessages += delta;
PRInt32 newUnreadMessages = mNumUnreadMessages + mNumPendingUnreadMessages;
nsCOMPtr<nsIMsgDatabase> db;
nsCOMPtr<nsIDBFolderInfo> folderInfo;
nsresult rv = GetDBFolderInfoAndDB(getter_AddRefs(folderInfo), getter_AddRefs(db));
if (NS_SUCCEEDED(rv) && folderInfo)
folderInfo->SetImapUnreadPendingMessages(mNumPendingUnreadMessages);
NotifyIntPropertyChanged(kTotalUnreadMessagesAtom, oldUnreadMessages, newUnreadMessages);
}
@ -1430,6 +1435,11 @@ void nsMsgFolder::ChangeNumPendingTotalMessages(PRInt32 delta)
mNumPendingTotalMessages += delta;
PRInt32 newTotalMessages = mNumTotalMessages + mNumPendingTotalMessages;
nsCOMPtr<nsIMsgDatabase> db;
nsCOMPtr<nsIDBFolderInfo> folderInfo;
nsresult rv = GetDBFolderInfoAndDB(getter_AddRefs(folderInfo), getter_AddRefs(db));
if (NS_SUCCEEDED(rv) && folderInfo)
folderInfo->SetImapTotalPendingMessages(mNumPendingTotalMessages);
NotifyIntPropertyChanged(kTotalMessagesAtom, oldTotalMessages, newTotalMessages);
}