Fetch messages in the background

This commit is contained in:
lilia 2015-02-11 23:23:37 -08:00
parent 52b3114970
commit 5ad5464dd1
2 changed files with 1 additions and 8 deletions

View file

@ -36,6 +36,7 @@
window.openConversation = function openConversation (modelId) { window.openConversation = function openConversation (modelId) {
var conversation = conversations.add({id: modelId}); var conversation = conversations.add({id: modelId});
conversation.fetch(); conversation.fetch();
conversation.fetchMessages();
var windowId = windowMap.windowIdFrom(modelId); var windowId = windowMap.windowIdFrom(modelId);

View file

@ -39,14 +39,6 @@
}); });
this.$el.find('.discussion-container').append(this.view.el); this.$el.find('.discussion-container').append(this.view.el);
if (this.model.id) {
this.model.fetchMessages({reset: true});
}
extension.on('message', function() {
this.model.fetchMessages();
}.bind(this));
window.addEventListener('resize', this.view.resize.bind(this.view)); window.addEventListener('resize', this.view.resize.bind(this.view));
}, },