зеркало из https://github.com/mozilla/gecko-dev.git
When navigating through the thread pane, scroll to the newly selected message. r=alecf
This commit is contained in:
Родитель
e533d87b8a
Коммит
38fe967182
|
@ -72,8 +72,11 @@ function GoUnreadThread(messageElement)
|
||||||
var messageuri = messageElement.getAttribute('id');
|
var messageuri = messageElement.getAttribute('id');
|
||||||
var messageResource = RDF.GetResource(messageuri);
|
var messageResource = RDF.GetResource(messageuri);
|
||||||
|
|
||||||
var unreadCount = GetMessageValue(messageResource, "http://home.netscape.com/NC-rdf#TotalUnreadMessages");
|
var message = messageResource.QueryInterface(Components.interfaces.nsIMessage);
|
||||||
return (unreadCount !="");
|
var folder = message.GetMsgFolder();
|
||||||
|
var thread = folder.getThreadForMessage(message);
|
||||||
|
|
||||||
|
return(thread.numUnreadChildren != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*GoNextMessage finds the message that matches criteria and selects it.
|
/*GoNextMessage finds the message that matches criteria and selects it.
|
||||||
|
@ -412,6 +415,7 @@ function ChangeSelection(tree, newMessage)
|
||||||
tree.clearItemSelection();
|
tree.clearItemSelection();
|
||||||
tree.clearCellSelection();
|
tree.clearCellSelection();
|
||||||
tree.selectItem(newMessage);
|
tree.selectItem(newMessage);
|
||||||
|
tree.ensureElementIsVisible(newMessage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче