pass uid of message read to finish message loading notification

This commit is contained in:
bienvenu%netscape.com 1999-09-12 18:27:19 +00:00
parent d9762ab44c
commit 41e8dfb284
3 changed files with 10 additions and 8 deletions

View File

@ -47,7 +47,7 @@ interface nsIImapMessageSink : nsISupports {
void ParseAdoptedMsgLine(in string adoptedMsgLine, in nsMsgKey uidOfMsg);
void NormalEndMsgWriteStream();
void NormalEndMsgWriteStream(in nsMsgKey uidOfMessage);
void AbortMsgWriteStream();

View File

@ -2229,7 +2229,7 @@ nsImapMailFolder::ParseAdoptedMsgLine(const char *adoptedMessageLine, nsMsgKey u
}
NS_IMETHODIMP
nsImapMailFolder::NormalEndMsgWriteStream()
nsImapMailFolder::NormalEndMsgWriteStream(nsMsgKey uidOfMessage)
{
nsresult res = NS_OK;
if (m_tempMessageStream)
@ -2240,6 +2240,7 @@ nsImapMailFolder::NormalEndMsgWriteStream()
}
nsCOMPtr<nsIMsgDBHdr> msgHdr;
m_curMsgUid = uidOfMessage;
res = GetMessageHeader(getter_AddRefs(msgHdr));
if (NS_SUCCEEDED(res))
msgHdr->MarkRead(PR_TRUE);

View File

@ -2521,12 +2521,13 @@ nsImapProtocol::PostLineDownLoadEvent(msg_line_info *downloadLineDontDelete)
PRUint32 count = 0;
char * line = downloadLineDontDelete->adoptedMessageLine;
m_channelOutputStream->Write(line, PL_strlen(line), &count);
if (m_imapMessageSink && downloadLineDontDelete)
{
m_imapMessageSink->ParseAdoptedMsgLine(downloadLineDontDelete->adoptedMessageLine,
downloadLineDontDelete->uidOfMessage);
}
}
else if (m_imapMessageSink && downloadLineDontDelete)
{
m_imapMessageSink->ParseAdoptedMsgLine(downloadLineDontDelete->adoptedMessageLine,
downloadLineDontDelete->uidOfMessage);
}
// ***** We need to handle the psuedo interrupt here *****
}
@ -2673,7 +2674,7 @@ void nsImapProtocol::NormalMessageEndDownload()
m_channelListener->OnDataAvailable(m_mockChannel, m_channelContext, m_channelInputStream, 0, inlength);
// need to know if we're downloading for display or not.
if (m_imapMessageSink)
m_imapMessageSink->NormalEndMsgWriteStream();
m_imapMessageSink->NormalEndMsgWriteStream(m_downloadLineCache.CurrentUID());
}
}