Bug 1354568 - Show the final file size in the Downloads Panel. r=mak draft
authorPaolo Amadini <paolo.mozmail@amadzone.org>
Tue, 18 Jul 2017 15:00:19 +0100
changeset 610575 445bc80d50dd3401175c1be639715679bb42d6b4
parent 610234 5e73b9798464c3f7106f0161dc9a49b234f42f9c
child 637900 7a364fccf1954023cef69c176ade1bf662000603
push id68935
push userpaolo.mozmail@amadzone.org
push dateTue, 18 Jul 2017 14:01:50 +0000
reviewersmak
bugs1354568
milestone56.0a1
Bug 1354568 - Show the final file size in the Downloads Panel. r=mak MozReview-Commit-ID: I9D2yaYpwHD
browser/components/downloads/DownloadsViewUI.jsm
--- a/browser/components/downloads/DownloadsViewUI.jsm
+++ b/browser/components/downloads/DownloadsViewUI.jsm
@@ -220,21 +220,22 @@ this.DownloadsViewUI.DownloadElementShel
         stateLabel = s.fileMovedOrMissing;
         hoverStatus = stateLabel;
       } else if (this.download.succeeded) {
         // For completed downloads, show the file size (e.g. "1.5 MB").
         if (this.download.target.size !== undefined) {
           let [size, unit] =
             DownloadUtils.convertByteUnits(this.download.target.size);
           stateLabel = s.sizeWithUnits(size, unit);
+          status = s.statusSeparator(s.stateCompleted, stateLabel);
         } else {
           // History downloads may not have a size defined.
           stateLabel = s.sizeUnknown;
+          status = s.stateCompleted;
         }
-        status = s.stateCompleted;
         hoverStatus = status;
       } else if (this.download.canceled) {
         stateLabel = s.stateCanceled;
       } else if (this.download.error.becauseBlockedByParentalControls) {
         stateLabel = s.stateBlockedParentalControls;
       } else if (this.download.error.becauseBlockedByReputationCheck) {
         stateLabel = this.rawBlockedTitleAndDetails[0];
       } else {