Bug 1638142 - Hide OpenPGP notification bars when moving away from a message. r=PatrickBrunschwig
authorKai Engert <kaie@kuix.de>
Fri, 15 May 2020 13:16:36 +0200
changeset 39165 01c458714912adb6478f6795c5b7b4e16974bb81
parent 39164 b0aeb62aae1d2e1e82163866add7d05a95583d31
child 39166 5c0ce2a8339d6e0e12f3c07ade5ef6ddd5683bd4
push id402
push userclokep@gmail.com
push dateMon, 29 Jun 2020 20:48:04 +0000
reviewersPatrickBrunschwig
bugs1638142
Bug 1638142 - Hide OpenPGP notification bars when moving away from a message. r=PatrickBrunschwig 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,24 @@ Enigmail.msg = {
       }
     }
 
     let exchBox = document.getElementById("enigmailBrokenExchangeBox");
     if (exchBox) {
       exchBox.setAttribute("collapsed", "true");
     }
 
+    let b = document.getElementById("openpgpKeyBox");
+    b.setAttribute("hidden", true);
+    b.removeAttribute("keydata");
+
+    let b2 = document.getElementById("signatureKeyBox");
+    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"