Closed Bug 748388 Opened 12 years ago Closed 12 years ago

Protocol icon not displayed/updated in the right pane when selecting a contact

Categories

(Thunderbird :: Instant Messaging, defect)

defect
Not set
normal

Tracking

(thunderbird14 fixed)

RESOLVED FIXED
Thunderbird 15.0
Tracking Status
thunderbird14 --- fixed

People

(Reporter: andreasn, Assigned: florian)

Details

Attachments

(2 files)

Attached image 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
If there is no twitter account present it seems gtalk gets no account icon there at all.
Attached patch PatchSplinter Review
Assignee: nobody → florian
Status: NEW → ASSIGNED
Attachment #617893 - Flags: review?(bwinton)
OS: Windows 7 → All
Hardware: x86_64 → All
Summary: Twitter icon also shows for gtalk accounts → Protocol icon not displayed/updated in the right pane when selecting a contact
Yay! Works with patch!
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.
Attachment #617893 - Flags: review?(bwinton) → review+
(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.
http://hg.mozilla.org/comm-central/rev/ea35258f80bd
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 15.0
Attachment #617893 - Flags: approval-comm-aurora?
Attachment #617893 - Flags: approval-comm-aurora? → approval-comm-aurora+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: