Fix: Show attachment views; they trigger update syncrhonously
FREEBIE
This commit is contained in:
parent
5afc16da06
commit
24174312b9
2 changed files with 5 additions and 4 deletions
|
@ -208,7 +208,7 @@
|
|||
this.update();
|
||||
},
|
||||
renderFileView: function() {
|
||||
this.view = new FileView({
|
||||
this.fileView = new FileView({
|
||||
model: {
|
||||
mediaType: this.mediaType(),
|
||||
fileName: this.displayName(),
|
||||
|
@ -217,8 +217,8 @@
|
|||
}
|
||||
});
|
||||
|
||||
this.view.$el.appendTo(this.$el.empty());
|
||||
this.view.render();
|
||||
this.fileView.$el.appendTo(this.$el.empty());
|
||||
this.fileView.render();
|
||||
return this;
|
||||
},
|
||||
update: function() {
|
||||
|
|
|
@ -295,13 +295,14 @@
|
|||
model: attachment,
|
||||
timestamp: this.model.get('sent_at')
|
||||
});
|
||||
view.render();
|
||||
this.loadedAttachments.push(view);
|
||||
|
||||
this.listenTo(view, 'update', function() {
|
||||
view.updated = true;
|
||||
this.appendAttachmentView(view);
|
||||
});
|
||||
|
||||
view.render();
|
||||
}.bind(this));
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue