2015-09-07 14:53:43 -07:00
|
|
|
/*
|
|
|
|
* vim: ts=4:sw=4:expandtab
|
2015-01-18 14:16:24 -10:00
|
|
|
*/
|
2014-07-22 08:55:26 -10:00
|
|
|
(function () {
|
2015-03-05 15:44:53 -08:00
|
|
|
'use strict';
|
|
|
|
window.Whisper = window.Whisper || {};
|
2014-07-22 08:55:26 -10:00
|
|
|
|
2015-03-05 15:44:53 -08:00
|
|
|
Whisper.ConversationListView = Whisper.ListView.extend({
|
|
|
|
tagName: 'div',
|
|
|
|
itemView: Whisper.ConversationListItemView,
|
2015-09-14 16:28:27 -07:00
|
|
|
onChangeActiveAt: function(conversation) {
|
2015-09-14 13:30:21 -07:00
|
|
|
var $el = this.$('.' + conversation.cid);
|
|
|
|
if ($el && $el.length > 0) {
|
2015-09-14 16:28:27 -07:00
|
|
|
if (conversation.get('active_at')) {
|
|
|
|
$el.prependTo(this.el);
|
|
|
|
} else {
|
|
|
|
$el.remove();
|
|
|
|
}
|
2015-09-14 13:30:21 -07:00
|
|
|
}
|
2015-03-05 15:44:53 -08:00
|
|
|
}
|
|
|
|
});
|
2014-07-22 08:55:26 -10:00
|
|
|
})();
|