mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 21:28:55 +00:00
fix problem where folders three levels deep or more were not shown in folder pane, if one of the ancestors was not subscribed to, sr=mscott 241319
This commit is contained in:
parent
cc6fdc52b2
commit
59b8bec315
@ -69,7 +69,6 @@ interface nsIImapMailFolderSink : nsISupports {
|
||||
attribute boolean folderNeedsACLListed;
|
||||
attribute boolean folderNeedsSubscribing;
|
||||
attribute boolean folderNeedsAdded;
|
||||
attribute boolean folderVerifiedOnline;
|
||||
attribute unsigned long aclFlags;
|
||||
attribute long uidValidity;
|
||||
/**
|
||||
|
@ -1722,9 +1722,9 @@ NS_IMETHODIMP nsImapIncomingServer::FolderVerifiedOnline(const char *folderName
|
||||
rv = rootFolder->FindSubFolder(nsDependentCString(folderName), getter_AddRefs(aFolder));
|
||||
if (NS_SUCCEEDED(rv) && aFolder)
|
||||
{
|
||||
nsCOMPtr<nsIImapMailFolderSink> imapFolder = do_QueryInterface(aFolder);
|
||||
nsCOMPtr<nsIMsgImapMailFolder> imapFolder = do_QueryInterface(aFolder);
|
||||
if (imapFolder)
|
||||
imapFolder->GetFolderVerifiedOnline(aResult);
|
||||
imapFolder->GetVerifiedAsOnlineFolder(aResult);
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
|
@ -1027,6 +1027,28 @@ NS_IMETHODIMP nsImapMailFolder::GetVerifiedAsOnlineFolder(PRBool *aVerifiedAsOnl
|
||||
NS_IMETHODIMP nsImapMailFolder::SetVerifiedAsOnlineFolder(PRBool aVerifiedAsOnlineFolder)
|
||||
{
|
||||
m_verifiedAsOnlineFolder = aVerifiedAsOnlineFolder;
|
||||
// mark ancestors as verified as well
|
||||
if (aVerifiedAsOnlineFolder)
|
||||
{
|
||||
nsCOMPtr<nsIMsgFolder> parent;
|
||||
do
|
||||
{
|
||||
GetParent(getter_AddRefs(parent));
|
||||
if (parent)
|
||||
{
|
||||
nsCOMPtr<nsIMsgImapMailFolder> imapParent = do_QueryInterface(parent);
|
||||
if (imapParent)
|
||||
{
|
||||
PRBool verifiedOnline;
|
||||
imapParent->GetVerifiedAsOnlineFolder(&verifiedOnline);
|
||||
if (verifiedOnline)
|
||||
break;
|
||||
imapParent->SetVerifiedAsOnlineFolder(PR_TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
while (parent);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -7039,20 +7061,6 @@ NS_IMETHODIMP nsImapMailFolder::SetFolderNeedsAdded(PRBool bVal)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsImapMailFolder::GetFolderVerifiedOnline(PRBool *bVal)
|
||||
{
|
||||
if (!bVal)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
*bVal = m_verifiedAsOnlineFolder;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsImapMailFolder::SetFolderVerifiedOnline(PRBool bVal)
|
||||
{
|
||||
m_verifiedAsOnlineFolder = bVal;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsImapMailFolder::GetFolderQuotaCommandIssued(PRBool *aCmdIssued)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aCmdIssued);
|
||||
|
Loading…
x
Reference in New Issue
Block a user