Cable-Desktop/js/views/conversation_list_view.js

23 lines
607 B
JavaScript
Raw Normal View History

/*
* vim: ts=4:sw=4:expandtab
2015-01-19 01:16:24 +01:00
*/
(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 {
$el.remove();
}
}
}
});
})();