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',
classNames: ['user-stream'],
loadMore: function() {
var userStreamView = this;
if (userStreamView.get('loading')) { return; }
actions: {
loadMore: function() {
var userStreamView = this;
if (userStreamView.get('loading')) { return; }
var stream = this.get('controller.model');
stream.findItems().then(function() {
userStreamView.set('loading', false);
userStreamView.get('eyeline').flushRest();
});
var stream = this.get('controller.model');
stream.findItems().then(function() {
userStreamView.set('loading', false);
userStreamView.get('eyeline').flushRest();
});
}
}
});