mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-12 09:01:16 +00:00
get replying to offline msg working sr=sspitzer 64424
This commit is contained in:
parent
12d3519765
commit
c428e1cd55
@ -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
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user