r=bienvenu. Don't fail if there's no unread thread.

This commit is contained in:
putterman%netscape.com 2000-03-14 05:29:34 +00:00
parent a1a6b438b0
commit da21edd0d1

View File

@ -1132,23 +1132,24 @@ nsresult nsMsgViewNavigationService::GetNextMessageByThread(nsIDOMXULElement *st
if(NS_FAILED(rv))
return rv;
nsCOMPtr<nsIDOMXULElement> nextMessageElement;
rv = FindNextInThread(info->type, info->tree, nextTopMessage, info->rdfService,
info->document, getter_AddRefs(nextMessageElement));
if(NS_FAILED(rv))
return rv;
if(nextMessageElement)
if(nextTopMessage)
{
rv = nextMessageElement->QueryInterface(NS_GET_IID(nsIDOMNode), (void**)nextMessage);
return rv;
}
else
{
return NS_OK;
nsCOMPtr<nsIDOMXULElement> nextMessageElement;
rv = FindNextInThread(info->type, info->tree, nextTopMessage, info->rdfService,
info->document, getter_AddRefs(nextMessageElement));
if(NS_FAILED(rv))
return rv;
if(nextMessageElement)
{
rv = nextMessageElement->QueryInterface(NS_GET_IID(nsIDOMNode), (void**)nextMessage);
return rv;
}
}
return NS_OK;
}
//Given a message, searches from siblings onward to find the next message. This is for the threaded view.