Bug 1428631 - Follow-up: Reinstate UpdateAttachmentBucket() which is needed by add-ons. r=aceman a=jorgk
authorJorg K <jorgk@jorgk.com>
Fri, 16 Mar 2018 11:05:53 +0100
changeset 30472 2c9749f769d899e14a38fc027551f541c3112a98
parent 30471 e00eecebce720686e13132f937682f674176ad45
child 30473 a039f10d899fca323ecd37248cddc56839c572ba
child 30475 7b2b70b0736966d566fc92ec2e832a7217b20eba
push id2144
push usermozilla@jorgk.com
push dateFri, 16 Mar 2018 11:44:21 +0000
treeherdercomm-beta@2c9749f769d8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaceman, jorgk
bugs1428631
Bug 1428631 - Follow-up: Reinstate UpdateAttachmentBucket() which is needed by add-ons. r=aceman a=jorgk
mail/components/compose/content/MsgComposeCommands.js
--- a/mail/components/compose/content/MsgComposeCommands.js
+++ b/mail/components/compose/content/MsgComposeCommands.js
@@ -4804,16 +4804,29 @@ function RemoveAllAttachments()
     updateAttachmentPane("show");
     gContentChanged = true;
     dispatchAttachmentBucketEvent("attachments-removed", removedAttachments);
     AttachmentsChanged();
   }
 }
 
 /**
+ * Display/hide and update the content of the attachment bucket (specifically
+ * the total file size of the attachments and the number of current attachments).
+ *
+ * @param aShowBucket true if the bucket should be shown, false otherwise
+ *
+ * Note: This is needed for add-on compatibility, for example in Enigmail.
+ */
+function UpdateAttachmentBucket(aShowBucket)
+{
+  updateAttachmentPane(aShowBucket ? "show" : "hide");
+}
+
+/**
  * Update the header bar information (number and total file size of attachments)
  * and tooltip of attachment pane, then (optionally) show or hide the pane.
  *
  * @param aShowPane {string} "show":  show the attachment pane
  *                           "hide":  hide the attachment pane
  *                           omitted: just update without changing pane visibility
  */
 function updateAttachmentPane(aShowPane)