FIX: Missing footer on groups pages

This commit is contained in:
Robin Ward 2018-01-23 16:20:53 -05:00
parent 0351565731
commit a469c65631
2 changed files with 8 additions and 3 deletions

View File

@ -24,7 +24,7 @@ export default Ember.Controller.extend({
group.findPosts(opts).then(newPosts => {
posts.addObjects(newPosts);
if(newPosts.length === 0) {
if (newPosts.length === 0) {
this.set('canLoadMore', false);
}
}).finally(() => {

View File

@ -12,8 +12,13 @@ export function buildGroupPage(type) {
},
setupController(controller, model) {
this.controllerFor('group-activity-posts').setProperties({ model, type, canLoadMore: true });
this.controllerFor("group").set("showing", type);
let loadedAll = model.length < 20;
this.controllerFor('group-activity-posts').setProperties({
model,
type,
canLoadMore: !loadedAll,
});
this.controllerFor('application').set('showFooter', loadedAll);
},
renderTemplate() {