This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/views/user-posts.js.es6
2014-07-17 13:43:22 -04:00

19 lines
480 B
JavaScript

export default Ember.View.extend(Discourse.LoadMore, {
loading: false,
eyelineSelector: ".user-stream .item",
classNames: ["user-stream"],
actions: {
loadMore: function() {
var self = this;
if (this.get("loading")) { return; }
var postsStream = this.get("controller.model");
postsStream.findItems().then(function () {
self.set("loading", false);
self.get("eyeline").flushRest();
}).catch(function () { });
}
}
});