Bug 1190350 - Bookmarks sidebar displays regular folder icons for livemarks. r=gijs

This commit is contained in:
Marco Bonardo 2015-10-14 18:49:23 +02:00
Родитель 71bb23b14d
Коммит c647f9c6b1
1 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -178,8 +178,9 @@ PlacesTreeView.prototype = {
let row = -1;
let useNodeIndex = typeof(aNodeIndex) == "number";
if (parent == this._rootNode)
if (parent == this._rootNode) {
row = useNodeIndex ? aNodeIndex : this._rootNode.getChildIndex(aNode);
}
else if (useNodeIndex && typeof(aParentRow) == "number") {
// If we have both the row of the parent node, and the node's index, we
// can avoid searching the rows array if the parent is a plain container.
@ -855,8 +856,7 @@ PlacesTreeView.prototype = {
.then(aLivemark => {
this._controller.cacheLivemarkInfo(aNode, aLivemark);
let properties = this._cellProperties.get(aNode);
this._cellProperties.set(aNode, properties += " livemark ");
this._cellProperties.set(aNode, properties += " livemark");
// The livemark attribute is set as a cell property on the title cell.
this._invalidateCellValue(aNode, this.COLUMN_TYPE_TITLE);
}, Components.utils.reportError);
@ -1175,7 +1175,8 @@ PlacesTreeView.prototype = {
PlacesUtils.livemarks.getLivemark({ id: node.itemId })
.then(aLivemark => {
this._controller.cacheLivemarkInfo(node, aLivemark);
properties += " livemark";
let props = this._cellProperties.get(node);
this._cellProperties.set(node, props += " livemark");
// The livemark attribute is set as a cell property on the title cell.
this._invalidateCellValue(node, this.COLUMN_TYPE_TITLE);
}, () => undefined);