fix 273063 clicking on partial download link in pop3 message leaves dup msg in folder, sr=mscott

This commit is contained in:
bienvenu%nventure.com 2004-12-04 03:24:21 +00:00
Родитель 529069672c
Коммит 8d619d77ff
1 изменённых файлов: 19 добавлений и 1 удалений

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

@ -3194,21 +3194,39 @@ nsMsgLocalMailFolder::OnStopRunningUrl(nsIURI * aUrl, nsresult aExitCode)
nsCAutoString aSpec;
aUrl->GetSpec(aSpec);
if (strstr(aSpec.get(), "uidl=") && msgWindow)
if (strstr(aSpec.get(), "uidl="))
{
nsCOMPtr<nsIPop3URL> popurl = do_QueryInterface(aUrl, &rv);
if (NS_SUCCEEDED(rv))
{
nsXPIDLCString messageuri;
rv = popurl->GetMessageUri(getter_Copies(messageuri));
if (NS_SUCCEEDED(rv))
{
nsCOMPtr<nsIRDFService> rdfService =
do_GetService("@mozilla.org/rdf/rdf-service;1", &rv);
if(NS_SUCCEEDED(rv))
{
nsCOMPtr <nsIMsgDBHdr> msgDBHdr;
rv = GetMsgDBHdrFromURI(messageuri, getter_AddRefs(msgDBHdr));
if(NS_SUCCEEDED(rv))
rv = mDatabase->DeleteHeader(msgDBHdr, nsnull, PR_TRUE,
PR_TRUE);
nsCOMPtr<nsIPop3Sink> pop3sink;
nsXPIDLCString newMessageUri;
rv = popurl->GetPop3Sink(getter_AddRefs(pop3sink));
if (NS_SUCCEEDED(rv))
{
pop3sink->GetMessageUri(getter_Copies(newMessageUri));
if(msgWindow)
{
msgWindow->SelectMessage(newMessageUri);
}
}
}
}
}
}
if (mFlags & MSG_FOLDER_FLAG_INBOX)
{