Store attachments as binary blobs
Move base64 encoding of attachments to an AttachmentView. This makes image rendering an asynchronous task so we fire an update event to indicate to the parent MessageListView that its content has changed height and it is time to scroll down.
This commit is contained in:
parent
bf22da209f
commit
99a2685f93
7 changed files with 70 additions and 46 deletions
|
@ -8,9 +8,11 @@ var Whisper = Whisper || {};
|
|||
className: 'discussion',
|
||||
itemView: Whisper.MessageView,
|
||||
events: {
|
||||
'add': 'scrollToBottom'
|
||||
'add': 'scrollToBottom',
|
||||
'update *': 'scrollToBottom'
|
||||
},
|
||||
scrollToBottom: function() {
|
||||
// TODO: Avoid scrolling if user has manually scrolled up?
|
||||
this.$el.scrollTop(this.el.scrollHeight);
|
||||
},
|
||||
addAll: function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue