Bug 1570679 - follow-up to fix backward logic for the "chat" attribute removal. r=aleca a=jorgk
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Wed, 21 Aug 2019 12:56:09 +0300
changeset 36179 da67254eae57f956d8bef5ed564f4975a29c0c5a
parent 36178 0e0b6fb625ce7dd891cc83e926d38296c4e85bc5
child 36180 ebafef38ef3df4bd69bc0d5d6fea8137bf15e837
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersaleca, jorgk
bugs1570679
Bug 1570679 - follow-up to fix backward logic for the "chat" attribute removal. r=aleca a=jorgk
mail/components/im/content/chat-messenger.js
--- a/mail/components/im/content/chat-messenger.js
+++ b/mail/components/im/content/chat-messenger.js
@@ -777,22 +777,21 @@ var chatHandler = {
       }
 
       imServices.logs.getLogsForConversation(item.conv, true).then(aLogs => {
         if (contactlistbox.selectedItem != item)
           return;
         this._showLogList(aLogs);
       });
 
-      let contextPaneBox = document.getElementById("contextPaneFlexibleBox");
+      document.querySelectorAll("#contextPaneFlexibleBox .conv-chat").forEach((e) => {
+        e.setAttribute("hidden", !item.conv.isChat);
+      });
       if (item.conv.isChat) {
-        contextPaneBox.setAttribute("hidden", "true");
         item.convView.showParticipants();
-      } else {
-        contextPaneBox.removeAttribute("hidden");
       }
 
       let button = document.getElementById("goToConversation");
       let bundle = document.getElementById("chatBundle");
       button.label = bundle.getString("goBackToCurrentConversation.button");
       button.disabled = false;
       this.observedContact = null;
     } else if (item.localName == "richlistitem" && item.getAttribute("is") == "chat-contact") {
@@ -805,17 +804,19 @@ var chatHandler = {
         return; // onselect has just been fired again because a status
                 // change caused the chat-contact to move.
                 // Return early to avoid flickering and changing the selected log.
       }
 
       this.showContactInfo(contact);
       this.observedContact = contact;
 
-      document.getElementById("contextPaneFlexibleBox").removeAttribute("hidden");
+      document.querySelectorAll("#contextPaneFlexibleBox .conv-chat").forEach((e) => {
+        e.setAttribute("hidden", "true");
+      });
 
       imServices.logs.getLogsForContact(contact, true).then(aLogs => {
         if (contactlistbox.selectedItem != item)
           return;
         if (!this._showLogList(aLogs, true)) {
           document.getElementById("conversationsDeck").selectedPanel =
             document.getElementById("logDisplay");
           document.getElementById("logDisplayDeck").selectedPanel =