fixed bug 12921, 12922 - duplicate folders in folder view

This commit is contained in:
jefft%netscape.com 1999-09-01 05:42:02 +00:00
parent e47c2b4fe6
commit f148c5748c

View File

@ -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;
} }