signal-desktop/js/views/conversation_list_view.js
lilia 760bfffb50 Show all contacts all the time
Contacts without conversation identity appear in alphabetical order at
the end of the inbox.

// FREEBIE
2016-03-18 11:21:11 -07:00

23 lines
731 B
JavaScript

/*
* vim: ts=4:sw=4:expandtab
*/
(function () {
'use strict';
window.Whisper = window.Whisper || {};
Whisper.ConversationListView = Whisper.ListView.extend({
tagName: 'div',
itemView: Whisper.ConversationListItemView,
onChangeActiveAt: function(conversation) {
var $el = this.$('.' + conversation.cid);
if ($el && $el.length > 0) {
if (conversation.get('active_at')) {
$el.prependTo(this.el);
} else {
var index = getInboxCollection().indexOf(conversation);
$el.insertBefore(this.$('.conversation-list-item')[index+1]);
}
}
}
});
})();