Rebind events when opening a previously opened conversation

pull/749/head
lilia 11 years ago
parent 99a2685f93
commit ccbe837ca2

@ -24,8 +24,6 @@ var Whisper = Whisper || {};
if (!this.view) { if (!this.view) {
this.view = new Whisper.ConversationView({ model: this.model }); this.view = new Whisper.ConversationView({ model: this.model });
} else {
this.view.delegateEvents();
} }
this.model.collection.trigger('selected', this.view); this.model.collection.trigger('selected', this.view);
}, },

@ -57,6 +57,8 @@
}, },
render: function() { render: function() {
this.delegateEvents();
this.view.delegateEvents();
this.view.scrollToBottom(); this.view.scrollToBottom();
return this; return this;
} }

Loading…
Cancel
Save