Commit aa37120c authored by Mark Harding's avatar Mark Harding

(fix): non-canary users with legacy feeds should scroll

1 merge request!373Refactor/es feeds
Pipeline #70067769 passed with stage
in 8 minutes and 39 seconds
......@@ -166,6 +166,11 @@ export class NewsfeedSubscribedComponent {
}
this.feedsService.inProgress.next(true);
if (!this.offset) {
this.feedsService.setOffset(0);
} else {
this.feedsService.setOffset(this.feedsService.rawFeed.getValue().length);
}
this.inProgress = true;
this.client.get('api/v1/newsfeed', { limit: 12, offset: this.offset }, { cache: true })
......@@ -186,14 +191,14 @@ export class NewsfeedSubscribedComponent {
});
}
this.feedsService.setOffset(this.feedsService.offset.getValue() + 12); // Hacky!
if (this.feedsService.rawFeed.getValue() && !refresh) {
this.feedsService.rawFeed.next([...this.feedsService.rawFeed.getValue(), ...feedItems]);
} else {
this.feedsService.rawFeed.next(feedItems);
}
this.feedsService.inProgress.next(false);
//this.feedsService.setOffset(this.feedsService.offset.getValue() + 12); // Hacky!
this.offset = data['load-next'];
this.inProgress = false;
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment