зеркало из https://github.com/mozilla/gecko-dev.git
Bug 910236 - The Downloads Panel shows one extra download for the number in "+ X other downloads". r=enn
This commit is contained in:
Родитель
506eb102e1
Коммит
d201131137
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче