summaryrefslogtreecommitdiffstats
path: root/application/palemoon/components/downloads/content/downloads.js
diff options
context:
space:
mode:
Diffstat (limited to 'application/palemoon/components/downloads/content/downloads.js')
-rw-r--r--application/palemoon/components/downloads/content/downloads.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/application/palemoon/components/downloads/content/downloads.js b/application/palemoon/components/downloads/content/downloads.js
index fb63f4b17..af0c85535 100644
--- a/application/palemoon/components/downloads/content/downloads.js
+++ b/application/palemoon/components/downloads/content/downloads.js
@@ -880,10 +880,10 @@ const DownloadsView = {
},
// DownloadsView
- onDataItemStateChanged(aDataItem, aOldState) {
+ onDataItemStateChanged(aDataItem) {
let viewItem = this._visibleViewItems.get(aDataItem);
if (viewItem) {
- viewItem.onStateChanged(aOldState);
+ viewItem.onStateChanged();
}
},
@@ -1126,16 +1126,14 @@ DownloadsViewItem.prototype = {
* the download might be the same as before, if the data layer received
* multiple events for the same download.
*/
- onStateChanged(aOldState) {
- {
+ onStateChanged() {
// If a download just finished successfully, it means that the target file
// now exists and we can extract its specific icon. To ensure that the icon
// is reloaded, we must change the URI used by the XUL image element, for
// example by adding a query parameter. Since this URI has a "moz-icon"
// scheme, this only works if we add one of the parameters explicitly
// supported by the nsIMozIconURI interface.
- if (aOldState != Ci.nsIDownloadManager.DOWNLOAD_FINISHED &&
- aOldState != this.dataItem.state) {
+ if (this.dataItem.state == Ci.nsIDownloadManager.DOWNLOAD_FINISHED) {
this._element.setAttribute("image", this.image + "&state=normal");
// We assume the existence of the target of a download that just completed