Introduce intl-friendly sort order for contact lists (#1900)
This commit is contained in:
parent
5cf320e429
commit
f0aaa7a1c5
5 changed files with 78 additions and 16 deletions
|
@ -72,6 +72,12 @@
|
|||
this.initialPromise = Promise.resolve();
|
||||
|
||||
this.contactCollection = new Backbone.Collection();
|
||||
var collator = new Intl.Collator();
|
||||
this.contactCollection.comparator = function(left, right) {
|
||||
left = left.getTitle().toLowerCase();
|
||||
right = right.getTitle().toLowerCase();
|
||||
return collator.compare(left, right);
|
||||
};
|
||||
this.messageCollection = new Whisper.MessageCollection([], {
|
||||
conversation: this
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue