mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-31 22:25:30 +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)
|
||||
{
|
||||
rv = CreateClientSubfolderInfo("Inbox");
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
PRBool hasSubFolders = PR_FALSE;
|
||||
GetHasSubFolders(&hasSubFolders);
|
||||
if (!hasSubFolders)
|
||||
{
|
||||
rv = CreateClientSubfolderInfo("Inbox");
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
}
|
||||
m_haveDiscoveredAllFolders = PR_TRUE;
|
||||
}
|
||||
selectFolder = PR_FALSE;
|
||||
@ -2648,22 +2653,6 @@ nsImapMailFolder::OnStopRunningUrl(nsIURI *aUrl, nsresult aExitCode)
|
||||
}
|
||||
}
|
||||
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:
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user