Bug 1638142 - Hide OpenPGP notification bars when moving away from a message. r=PatrickBrunschwig a=wsmwk
authorKai Engert <kaie@kuix.de>
Fri, 15 May 2020 13:16:36 +0200
changeset 38150 099d4b4bb77c368a5477186037fc68af757f2cc3
parent 38149 1e4fca1274f33c5ceca5dd9f8363a339e16d853b
child 38151 f78f85f503c0fda54b976b607f827fc43d9f38a2
push id2602
push userkaie@kuix.de
push dateSun, 17 May 2020 18:03:23 +0000
treeherdercomm-beta@f78f85f503c0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersPatrickBrunschwig, wsmwk
bugs1638142
Bug 1638142 - Hide OpenPGP notification bars when moving away from a message. r=PatrickBrunschwig a=wsmwk Differential Revision: https://phabricator.services.mozilla.com/D75516
mail/extensions/openpgp/content/ui/enigmailMessengerOverlay.js
--- a/mail/extensions/openpgp/content/ui/enigmailMessengerOverlay.js
+++ b/mail/extensions/openpgp/content/ui/enigmailMessengerOverlay.js
@@ -309,23 +309,16 @@ Enigmail.msg = {
     gMessageListeners.push(Enigmail.msg.messageListener);
     Enigmail.msg.messageListener.onEndHeaders();
   },
 
   messageListener: {
     onStartHeaders() {
       Enigmail.hdrView.reset();
       Enigmail.msg.mimeParts = null;
-      let b = document.getElementById("openpgpKeyBox");
-      b.setAttribute("hidden", true);
-      b.removeAttribute("keydata");
-
-      let b2 = document.getElementById("signatureKeyBox");
-      b2.setAttribute("hidden", true);
-      b2.removeAttribute("keyid");
 
       /*
       if ("autocrypt" in gExpandedHeaderView) {
         delete gExpandedHeaderView.autocrypt;
       }
       */
       if ("openpgp" in gExpandedHeaderView) {
         delete gExpandedHeaderView.openpgp;
@@ -403,16 +396,28 @@ Enigmail.msg = {
       }
     }
 
     let exchBox = document.getElementById("enigmailBrokenExchangeBox");
     if (exchBox) {
       exchBox.setAttribute("collapsed", "true");
     }
 
+    let b = document.getElementById("openpgpKeyBox");
+    if (b) {
+      b.setAttribute("hidden", true);
+      b.removeAttribute("keydata");
+    }
+
+    let b2 = document.getElementById("signatureKeyBox");
+    if (b2) {
+      b2.setAttribute("hidden", true);
+      b2.removeAttribute("keyid");
+    }
+
     this.setAttachmentReveal(null);
 
     if (Enigmail.msg.createdURIs.length) {
       // Cleanup messages belonging to this window (just in case)
       var enigmailSvc = Enigmail.getEnigmailSvc();
       if (enigmailSvc) {
         EnigmailLog.DEBUG(
           "enigmailMessengerOverlay.js: Cleanup: Deleting messages\n"