mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 06:35:42 +00:00
fixed bug 12921, 12922 - duplicate folders in folder view
This commit is contained in:
parent
e47c2b4fe6
commit
f148c5748c
@ -430,9 +430,14 @@ NS_IMETHODIMP nsImapMailFolder::GetMessages(nsISimpleEnumerator* *result)
|
|||||||
{
|
{
|
||||||
if (!m_haveDiscoveredAllFolders)
|
if (!m_haveDiscoveredAllFolders)
|
||||||
{
|
{
|
||||||
rv = CreateClientSubfolderInfo("Inbox");
|
PRBool hasSubFolders = PR_FALSE;
|
||||||
if (NS_FAILED(rv))
|
GetHasSubFolders(&hasSubFolders);
|
||||||
return rv;
|
if (!hasSubFolders)
|
||||||
|
{
|
||||||
|
rv = CreateClientSubfolderInfo("Inbox");
|
||||||
|
if (NS_FAILED(rv))
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
m_haveDiscoveredAllFolders = PR_TRUE;
|
m_haveDiscoveredAllFolders = PR_TRUE;
|
||||||
}
|
}
|
||||||
selectFolder = PR_FALSE;
|
selectFolder = PR_FALSE;
|
||||||
@ -2648,22 +2653,6 @@ nsImapMailFolder::OnStopRunningUrl(nsIURI *aUrl, nsresult aExitCode)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case nsIImapUrl::nsImapCreateFolder:
|
|
||||||
{
|
|
||||||
char *path = nsnull;
|
|
||||||
rv = imapUrl->CreateCanonicalSourceFolderPathString(&path);
|
|
||||||
if (NS_SUCCEEDED(rv))
|
|
||||||
{
|
|
||||||
nsCOMPtr<nsIMsgImapMailFolder> imapFolder;
|
|
||||||
rv = QueryInterface(nsCOMTypeInfo
|
|
||||||
<nsIMsgImapMailFolder>::GetIID(),
|
|
||||||
getter_AddRefs(imapFolder));
|
|
||||||
if (NS_SUCCEEDED(rv))
|
|
||||||
imapFolder->CreateClientSubfolderInfo(path);
|
|
||||||
PR_FREEIF(path);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user