Fix double selected states

Previously, when changing selection from an unread to a read
conversation, the unread conversation would not be deselected.

// FREEBIE
This commit is contained in:
lilia 2015-09-14 15:31:29 -07:00
parent 50add90fd9
commit b81d93177a
2 changed files with 1 additions and 9 deletions

View file

@ -24,7 +24,7 @@
},
select: function(e) {
this.$el.addClass('selected');
this.$el.addClass('selected').siblings('.selected').removeClass('selected');
this.$el.trigger('select', {conversation: this.model});
},

View file

@ -8,14 +8,6 @@
Whisper.ConversationListView = Whisper.ListView.extend({
tagName: 'div',
itemView: Whisper.ConversationListItemView,
events: {
'click .contact': 'select',
},
select: function(e) {
var target = $(e.target).closest('.contact');
target.siblings().removeClass('selected');
return false;
},
moveToTop: function(conversation) {
var $el = this.$('.' + conversation.cid);
if ($el && $el.length > 0) {