Last Comment Bug 742677 - IRC members list not sorted alphabetically
: IRC members list not sorted alphabetically
Status: RESOLVED FIXED
:
Product: Thunderbird
Classification: Client Software
Component: Instant Messaging (show other bugs)
: Trunk
: x86 Windows XP
: -- normal (vote)
: Thunderbird 17.0
Assigned To: Mike Conley (:mconley)
:
:
Mentors:
Depends on:
Blocks: 740280
  Show dependency treegraph
 
Reported: 2012-04-05 04:01 PDT by Sebastian Hengst [:aryx][:archaeopteryx] (needinfo on intermittent or backout)
Modified: 2012-07-17 14:00 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
fixed
fixed


Attachments
IRC members list (8.74 KB, image/png)
2012-04-05 04:01 PDT, Sebastian Hengst [:aryx][:archaeopteryx] (needinfo on intermittent or backout)
no flags Details
Patch v1 (1.40 KB, patch)
2012-07-16 14:53 PDT, Mike Conley (:mconley)
no flags Details | Diff | Splinter Review
Patch v2 (2.36 KB, patch)
2012-07-17 10:46 PDT, Mike Conley (:mconley)
florian: review+
standard8: approval‑comm‑aurora+
standard8: approval‑comm‑beta+
Details | Diff | Splinter Review

Description Sebastian Hengst [:aryx][:archaeopteryx] (needinfo on intermittent or backout) 2012-04-05 04:01:55 PDT
Created attachment 612498 [details]
IRC members list

Thunderbird Daily 2012-04-04, Windows XP SP 3 32-bit

The list of members of an IRC channel is not sorted alphabetically, see attached screenshot.
Comment 1 Florian Quèze [:florian] [:flo] 2012-04-05 05:15:14 PDT
Are there additional steps to reproduce? The lists I see in my Thunderbird are sorted correctly.
Comment 2 Sebastian Hengst [:aryx][:archaeopteryx] (needinfo on intermittent or backout) 2012-04-05 05:20:57 PDT
Unfortunately not. I played with quitting and rejoining and later found the result shown in the screenshot.
Comment 3 Florian Quèze [:florian] [:flo] 2012-06-06 10:05:51 PDT
I found a way to reproduce: this happens when clicking on the "Conversations" line (the very first item in the list of the left pane) and then selecting a chat room again.
Comment 4 Mike Conley (:mconley) 2012-07-16 11:58:07 PDT
Gonna see if I can help Florian out by grabbing this one.
Comment 5 Mike Conley (:mconley) 2012-07-16 14:50:04 PDT
Alright, I think I've figured this one out - the pane's contacts are being sorted via insertion sort in imconversation.xml in addNick.

addNick relies on the listbox "nicklist" having a reliable count.

At the time of switching from the "Conversation" line in the left pane, the nicklist is hidden, and so we're unable to get a proper count (since apparently listbox will only give us a proper count when the item is visible).

So we simply need to make the contextPane visible before we list the participants. Patch is up next.
Comment 6 Mike Conley (:mconley) 2012-07-16 14:53:39 PDT
Created attachment 642745 [details] [diff] [review]
Patch v1
Comment 7 Florian Quèze [:florian] [:flo] 2012-07-17 10:37:09 PDT
(In reply to Mike Conley (:mconley) from comment #6)
> Created attachment 642745 [details] [diff] [review]
> Patch v1

What about just moving this line http://hg.mozilla.org/comm-central/annotate/f71ece130895/mail/components/im/content/chat-messenger-overlay.js#l592 to line 496?
Comment 8 Mike Conley (:mconley) 2012-07-17 10:46:01 PDT
Created attachment 643030 [details] [diff] [review]
Patch v2

As suggested here and in IRC, I've moved the code that makes the contextPane visible from the bottom of the function to closer to the top.
Comment 9 Florian Quèze [:florian] [:flo] 2012-07-17 10:48:06 PDT
Comment on attachment 643030 [details] [diff] [review]
Patch v2

Looks good, thanks! Note: I haven't tested this patch, I assume you have or will before the check-in.
Comment 10 Mike Conley (:mconley) 2012-07-17 10:48:32 PDT
(In reply to Florian Quèze from comment #9)
> Comment on attachment 643030 [details] [diff] [review]
> Patch v2
> 
> Looks good, thanks! Note: I haven't tested this patch, I assume you have or
> will before the check-in.

Yes, manually tested.

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