mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-09 21:33:43 +00:00
pass uid of message read to finish message loading notification
This commit is contained in:
parent
d9762ab44c
commit
41e8dfb284
@ -47,7 +47,7 @@ interface nsIImapMessageSink : nsISupports {
|
||||
|
||||
void ParseAdoptedMsgLine(in string adoptedMsgLine, in nsMsgKey uidOfMsg);
|
||||
|
||||
void NormalEndMsgWriteStream();
|
||||
void NormalEndMsgWriteStream(in nsMsgKey uidOfMessage);
|
||||
|
||||
void AbortMsgWriteStream();
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user