Fetch messages in the background

pull/749/head
lilia 10 years ago
parent 52b3114970
commit 5ad5464dd1

@ -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);

@ -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));
}, },

Loading…
Cancel
Save