Fix non-disappearing resend button
The resend button should disappear once you've clicked it. This was not happening because the message detail view held a cached copy of the old message errors. Fix by re-reading the errors when we re-render. // FREEBIE
This commit is contained in:
parent
0ff38e41c2
commit
87d4f0d5d8
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,6 @@
|
|||
initialize: function(options) {
|
||||
this.view = new Whisper.MessageView({model: this.model});
|
||||
this.conversation = options.conversation;
|
||||
this.errors = _.groupBy(this.model.get('errors'), 'number');
|
||||
|
||||
this.listenTo(this.model, 'change', this.render);
|
||||
},
|
||||
|
@ -105,6 +104,7 @@
|
|||
}).render().$el.appendTo(this.$('.contacts'));
|
||||
},
|
||||
render: function() {
|
||||
this.errors = _.groupBy(this.model.get('errors'), 'number');
|
||||
this.$el.html(Mustache.render(this.template, {
|
||||
sent_at : moment(this.model.get('sent_at')).toString(),
|
||||
received_at : moment(this.model.get('received_at')).toString(),
|
||||
|
|
Loading…
Reference in a new issue