Fetch messages in the background
This commit is contained in:
@@ -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));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user