Fix re-rendering when resolving conflicts with media

* Don't open message detail views from message detail views
* When message errors change, re-render the error state, but
  not the message markup and contents.
* Fix renderErrors bug not removing the error class correctly.

// FREEBIE
This commit is contained in:
lilia 2015-11-05 20:11:28 -08:00
parent 9c8933c3d0
commit ddd2e67eb5
3 changed files with 6 additions and 4 deletions

View file

@ -36,6 +36,7 @@
template: $('#message-detail').html(),
initialize: function(options) {
this.view = new Whisper.MessageView({model: this.model});
this.view.render();
this.conversation = options.conversation;
this.listenTo(this.model, 'change', this.render);
@ -113,7 +114,7 @@
errors : this.errors['undefined'],
hasRetry : hasRetry
}));
this.view.render().$el.prependTo(this.$('.message-container'));
this.view.$el.prependTo(this.$('.message-container'));
if (this.model.isOutgoing()) {
this.conversation.contactCollection.reject(function(c) {