зеркало из https://github.com/mozilla/pjs.git
Bug 595333 - Downloads started during DownloadView initialization are added twice [r=mfinkle]
This commit is contained in:
Родитель
8bedc9c8f0
Коммит
53ac8bc028
|
@ -73,7 +73,10 @@ var DownloadsView = {
|
||||||
},
|
},
|
||||||
|
|
||||||
_createItem: function dv__createItem(aAttrs) {
|
_createItem: function dv__createItem(aAttrs) {
|
||||||
let item = document.createElement("richlistitem");
|
// Make sure this doesn't already exist
|
||||||
|
let item = this.getElementForDownload(aAttrs.id);
|
||||||
|
if (!item) {
|
||||||
|
item = document.createElement("richlistitem");
|
||||||
|
|
||||||
// Copy the attributes from the argument into the item
|
// Copy the attributes from the argument into the item
|
||||||
for (let attr in aAttrs)
|
for (let attr in aAttrs)
|
||||||
|
@ -89,7 +92,7 @@ var DownloadsView = {
|
||||||
// Initialize more complex attributes
|
// Initialize more complex attributes
|
||||||
this._updateTime(item);
|
this._updateTime(item);
|
||||||
this._updateStatus(item);
|
this._updateStatus(item);
|
||||||
|
}
|
||||||
return item;
|
return item;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче