Last Comment Bug 748388 - Protocol icon not displayed/updated in the right pane when selecting a contact
: Protocol icon not displayed/updated in the right pane when selecting a contact
Status: RESOLVED FIXED
:
Product: Thunderbird
Classification: Client Software
Component: Instant Messaging (show other bugs)
: Trunk
: All All
: -- normal (vote)
: Thunderbird 15.0
Assigned To: Florian Quèze [:florian] [:flo]
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-24 08:42 PDT by Andreas Nilsson (:andreasn)
Modified: 2012-05-15 06:54 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
fixed


Attachments
screenshot of the issue (75.40 KB, image/png)
2012-04-24 08:42 PDT, Andreas Nilsson (:andreasn)
no flags Details
Patch (1.15 KB, patch)
2012-04-24 09:11 PDT, Florian Quèze [:florian] [:flo]
bwinton: review+
mozilla: approval‑comm‑aurora+
Details | Diff | Splinter Review

Description Andreas Nilsson (:andreasn) 2012-04-24 08:42:16 PDT
Created attachment 617886 [details]
screenshot of the issue

In the right sidebar, my gmail accounts also gets the twitter icon.
Steps to reproduce:
1. Start with a fresh profile
2. Set up twitter
3. Set up gtalk
Comment 1 Andreas Nilsson (:andreasn) 2012-04-24 08:49:14 PDT
If there is no twitter account present it seems gtalk gets no account icon there at all.
Comment 2 Florian Quèze [:florian] [:flo] 2012-04-24 09:11:44 PDT
Created attachment 617893 [details] [diff] [review]
Patch
Comment 3 Andreas Nilsson (:andreasn) 2012-04-24 09:52:53 PDT
Yay! Works with patch!
Comment 4 Blake Winton (:bwinton) (:☕️) 2012-04-24 11:19:26 PDT
Comment on attachment 617893 [details] [diff] [review]
Patch

>+++ b/mail/components/im/content/chat-messenger-overlay.js
>@@ -308,16 +308,18 @@ var chatHandler = {
>   showContactInfo: function(aContact) {
>     let cti = document.getElementById("conv-top-info");
>     cti.setAttribute("userIcon", aContact.buddyIconFilename);
>     cti.setAttribute("displayName", aContact.displayName);
>+    let proto = aContact.preferredBuddy.protocol;
>+    cti.setAttribute("prplIcon", proto.iconBaseURI + "icon.png");

So, as a fix this makes sense, but I'm unclear as to why the twitter icon was showing up previously…

r=me with that explained.  ;)

Thanks,
Blake.
Comment 5 Florian Quèze [:florian] [:flo] 2012-04-25 03:08:31 PDT
(In reply to Blake Winton (:bwinton - Thunderbird UX) from comment #4)
> Comment on attachment 617893 [details] [diff] [review]
> Patch
> 
> >+++ b/mail/components/im/content/chat-messenger-overlay.js
> >@@ -308,16 +308,18 @@ var chatHandler = {
> >   showContactInfo: function(aContact) {
> >     let cti = document.getElementById("conv-top-info");
> >     cti.setAttribute("userIcon", aContact.buddyIconFilename);
> >     cti.setAttribute("displayName", aContact.displayName);
> >+    let proto = aContact.preferredBuddy.protocol;
> >+    cti.setAttribute("prplIcon", proto.iconBaseURI + "icon.png");
> 
> So, as a fix this makes sense, but I'm unclear as to why the twitter icon
> was showing up previously…
> 
> r=me with that explained.  ;)

That's easy to explain: the code updating the attributes of the "conv-top-info" element executed when a conversation is selected updates the "prplIcon" attribute, but the code updating that attribute when a contact is selected was missing.
So the Twitter icon that Andreas was seeing is the icon of the last conversation he had selected (his twitter timeline) before selecting the contact.

What I would have a hard time explaining though is how that bug appeared. The 2 most likely hypothesis are:
- the code setting that attribute when selecting a contact was lost during a refactoring that I can neither remember nor find a trace of.
- that never worked, but nobody noticed because it's harder to notice a missing icon than a wrong icon, and during most of my testing the conversations were from the same protocol as the connected account.
Comment 6 Florian Quèze [:florian] [:flo] 2012-05-02 03:30:17 PDT
http://hg.mozilla.org/comm-central/rev/ea35258f80bd
Comment 7 Florian Quèze [:florian] [:flo] 2012-05-15 06:54:06 PDT
https://hg.mozilla.org/releases/comm-aurora/rev/c06afbc01046

Note You need to log in before you can comment on or make changes to this bug.