FIX: use actions in user_stream_view.js

This commit is contained in:
Neil Lalonde 2014-01-29 12:26:22 -05:00
parent c8bc9bd5db
commit 6ea257d0b1

View File

@ -12,14 +12,16 @@ Discourse.UserStreamView = Discourse.View.extend(Discourse.LoadMore, {
eyelineSelector: '.user-stream .item', eyelineSelector: '.user-stream .item',
classNames: ['user-stream'], classNames: ['user-stream'],
loadMore: function() { actions: {
var userStreamView = this; loadMore: function() {
if (userStreamView.get('loading')) { return; } var userStreamView = this;
if (userStreamView.get('loading')) { return; }
var stream = this.get('controller.model'); var stream = this.get('controller.model');
stream.findItems().then(function() { stream.findItems().then(function() {
userStreamView.set('loading', false); userStreamView.set('loading', false);
userStreamView.get('eyeline').flushRest(); userStreamView.get('eyeline').flushRest();
}); });
}
} }
}); });