get replying to offline msg working sr=sspitzer 64424

This commit is contained in:
bienvenu%netscape.com 2001-03-25 22:13:22 +00:00
parent 12d3519765
commit c428e1cd55
3 changed files with 28 additions and 4 deletions

View File

@ -611,10 +611,13 @@ nsresult nsImapProtocol::SetupWithUrl(nsIURI * aURL, nsISupports* aConsumer)
// Ensure that the socket can get the notification callbacks
nsCOMPtr<nsIInterfaceRequestor> callbacks;
m_mockChannel->GetNotificationCallbacks(getter_AddRefs(callbacks));
m_channel->SetNotificationCallbacks(callbacks, PR_FALSE);
if (m_channel)
{
m_channel->SetNotificationCallbacks(callbacks, PR_FALSE);
if (NS_SUCCEEDED(rv))
rv = m_channel->OpenOutputStream(0, -1, 0, getter_AddRefs(m_outputStream));
if (NS_SUCCEEDED(rv))
rv = m_channel->OpenOutputStream(0, -1, 0, getter_AddRefs(m_outputStream));
}
}
} // if m_runningUrl

View File

@ -288,7 +288,18 @@ NS_IMETHODIMP nsImapService::GetUrlForUri(const char *aMessageURI, nsIURI **aURL
PRUnichar hierarchySeparator = GetHierarchyDelimiter(folder);;
rv = CreateStartOfImapUrl(aMessageURI, getter_AddRefs(imapUrl), folder, nsnull, urlSpec, hierarchySeparator);
if (NS_FAILED(rv)) return rv;
imapUrl->SetImapMessageSink(imapMessageSink);
imapUrl->SetImapMessageSink(imapMessageSink);
imapUrl->SetImapFolder(folder);
if (folder)
{
nsCOMPtr <nsIMsgMailNewsUrl> mailnewsUrl = do_QueryInterface(imapUrl);
if (mailnewsUrl)
{
PRBool useLocalCache = PR_FALSE;
folder->HasMsgOffline(atoi(msgKey), &useLocalCache);
mailnewsUrl->SetMsgIsInLocalCache(useLocalCache);
}
}
nsCOMPtr<nsIURI> url = do_QueryInterface(imapUrl);
nsXPIDLCString currentSpec;

View File

@ -377,6 +377,16 @@ NS_IMETHODIMP nsNntpService::GetUrlForUri(const char *aMessageURI, nsIURI **aURL
// this is only called by view message source
rv = ConstructNntpUrl(messageIdURL.get(), nsnull, aMsgWindow, aMessageURI, nsINntpUrl::ActionDisplayArticle, aURL);
NS_ENSURE_SUCCESS(rv,rv);
if (folder && *aURL)
{
nsCOMPtr <nsIMsgMailNewsUrl> mailnewsUrl = do_QueryInterface(*aURL);
if (mailnewsUrl)
{
PRBool useLocalCache = PR_FALSE;
folder->HasMsgOffline(key, &useLocalCache);
mailnewsUrl->SetMsgIsInLocalCache(useLocalCache);
}
}
return rv;
}