Show all contacts all the time
Contacts without conversation identity appear in alphabetical order at the end of the inbox. // FREEBIE
This commit is contained in:
@@ -17,8 +17,29 @@
|
||||
|
||||
this.listenTo(conversations, 'add change:active_at', this.addActive);
|
||||
},
|
||||
comparator: function(model) {
|
||||
return -model.get('timestamp');
|
||||
comparator: function(m1, m2) {
|
||||
var timestamp1 = m1.get('timestamp');
|
||||
var timestamp2 = m2.get('timestamp');
|
||||
if (timestamp1 && timestamp2) {
|
||||
return timestamp2 - timestamp1;
|
||||
}
|
||||
if (timestamp1) {
|
||||
return -1;
|
||||
}
|
||||
if (timestamp2) {
|
||||
return 1;
|
||||
}
|
||||
var title1 = m1.getTitle().toLowerCase();
|
||||
var title2 = m2.getTitle().toLowerCase();
|
||||
if (title1 === title2) {
|
||||
return 0;
|
||||
}
|
||||
if (title1 < title2) {
|
||||
return -1;
|
||||
}
|
||||
if (title1 > title2) {
|
||||
return 1;
|
||||
}
|
||||
},
|
||||
addActive: function(model) {
|
||||
if (model.get('active_at')) {
|
||||
|
Reference in New Issue
Block a user