FIX: Missing footer on groups pages
This commit is contained in:
parent
0351565731
commit
a469c65631
|
@ -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(() => {
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue