librelist archives

« back to archive

ConverseJS : Display Flat Contact List in alphabetical order regardless of the chat status.

ConverseJS : Display Flat Contact List in alphabetical order regardless of the chat status.

From:
Gauri Padbidri
Date:
2015-02-23 @ 22:35
Hi All,

 

I want to display users list based on alphabetical order regardless the Chat
Status of the contact. I tweaked the code a bit, I have an issue : 

 

Steps to reproduce : 

1.            Login to the ConverseJS Web Client.

2.            Observe the Contacts Panel View. It will have all online
members on TOP and hence the Contact / Roster List will not be in
alphabetical order.

3.            Now comment the following line in converse.js :
this.RosterGroupView.initialize() -> this.model.contacts.sort(); // Comment
this line

4.            Clear Browser Cache and repeat Step #1.

5.            Observe that now the Contacts are in alphabetical order. My
code commented in Step #3 works.

6.            Now, Refresh the page.

7.            OBSERVE : We see results like Step #2 meaning Online members
stacked on TOP.

 

Result : I need Contact List on the basis of their Alphabetical Order and
not based on their online status on Page refresh as well.

 

Where  can I fix this issue ? Which code gets called when I refresh the
page.  Please help. Thanks !

 

Best Regards,

Gauri Padbidri