mirror of https://github.com/zulip/zulip.git
Fix formatting for Group PMs in the right sidebar.
We now sort users by the lower case value of their full names in each of the links in the "GROUP PMs" section of the right sidebar. We still use "+n others" for big huddles.
This commit is contained in:
parent
d953eca14c
commit
604079a9d4
|
@ -150,10 +150,13 @@ exports.short_huddle_name = function (huddle) {
|
|||
var user_ids = huddle.split(',');
|
||||
|
||||
var num_to_show = 3;
|
||||
var names = _.map(user_ids.slice(0, num_to_show), function (user_id) {
|
||||
var names = _.map(user_ids, function (user_id) {
|
||||
var person = people.get_person_from_user_id(user_id);
|
||||
return person.full_name;
|
||||
});
|
||||
|
||||
names = _.sortBy(names, function (name) { return name.toLowerCase(); });
|
||||
names = names.slice(0, num_to_show);
|
||||
var others = user_ids.length - num_to_show;
|
||||
|
||||
if (others === 1) {
|
||||
|
|
Loading…
Reference in New Issue