diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-07-29 09:32:40 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-07-29 09:32:40 +0200 |
commit | ac3159f02f3b60a8f20a22ff6a66c51d075e11a7 (patch) | |
tree | 139786ada8d536d6c29c18a5e6866eddb6390500 /application/palemoon/components/downloads/content/downloads.js | |
parent | e666c9a8e06c7de97fe0462a9219b19835980384 (diff) | |
download | UXP-ac3159f02f3b60a8f20a22ff6a66c51d075e11a7.tar UXP-ac3159f02f3b60a8f20a22ff6a66c51d075e11a7.tar.gz UXP-ac3159f02f3b60a8f20a22ff6a66c51d075e11a7.tar.lz UXP-ac3159f02f3b60a8f20a22ff6a66c51d075e11a7.tar.xz UXP-ac3159f02f3b60a8f20a22ff6a66c51d075e11a7.zip |
[PALEMOON] Bug 1116176 - Create DownloadsHistoryDataItem and HistoryDownload objects
Diffstat (limited to 'application/palemoon/components/downloads/content/downloads.js')
-rw-r--r-- | application/palemoon/components/downloads/content/downloads.js | 10 |
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 |