mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
r=bienvenu. Don't fail if there's no unread thread.
This commit is contained in:
parent
a1a6b438b0
commit
da21edd0d1
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user