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
@ -429,10 +429,15 @@ NS_IMETHODIMP nsImapMailFolder::GetMessages(nsISimpleEnumerator* *result)
|
||||
if (NS_SUCCEEDED(rv) && isServer)
|
||||
{
|
||||
if (!m_haveDiscoveredAllFolders)
|
||||
{
|
||||
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