Bug 910236 - The Downloads Panel shows one extra download for the number in "+ X other downloads". r=enn

This commit is contained in:
Paolo Amadini 2013-09-17 19:37:00 +02:00
Родитель 506eb102e1
Коммит d201131137
1 изменённых файлов: 5 добавлений и 3 удалений

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

@ -151,6 +151,8 @@ const DownloadsPanel = {
DownloadsViewController.initialize();
DownloadsCommon.log("Attaching DownloadsView...");
DownloadsCommon.getData(window).addView(DownloadsView);
DownloadsCommon.getSummary(window, DownloadsView.kItemCountLimit)
.addView(DownloadsSummary);
DownloadsCommon.log("DownloadsView attached - the panel for this window",
"should now see download items come in.");
DownloadsPanel._attachEventListeners();
@ -179,6 +181,8 @@ const DownloadsPanel = {
DownloadsViewController.terminate();
DownloadsCommon.getData(window).removeView(DownloadsView);
DownloadsCommon.getSummary(window, DownloadsView.kItemCountLimit)
.removeView(DownloadsSummary);
this._unattachEventListeners();
this._state = this.kStateUninitialized;
@ -1575,10 +1579,8 @@ const DownloadsSummary = {
}
if (aActive) {
DownloadsCommon.getSummary(window, DownloadsView.kItemCountLimit)
.addView(this);
.refreshView(this);
} else {
DownloadsCommon.getSummary(window, DownloadsView.kItemCountLimit)
.removeView(this);
DownloadsFooter.showingSummary = false;
}