Commit c0afaac3 authored by Marcelo Rivera's avatar Marcelo Rivera

(fix): move subscription to constructor

parent 8b5cda32
1 merge request!594Pro Feeds not working
Pipeline #89263685 failed with stages
in 2 minutes and 6 seconds
......@@ -53,7 +53,20 @@ export class ProChannelListComponent implements OnInit, OnDestroy {
protected router: Router,
protected cd: ChangeDetectorRef,
protected injector: Injector
) {}
) {
this.entities$ = this.feedsService.feed.pipe(
map((elements: BehaviorSubject<any>[]) => {
return elements.filter((element: BehaviorSubject<any>) => {
const entity = element.getValue();
return (
!!entity.thumbnail_src ||
!!entity.custom_data ||
(entity.thumbnails && entity.thumbnails.length > 0)
);
});
})
);
}
ngOnInit() {
this.params$ = this.route.params.subscribe(params => {
......@@ -88,19 +101,6 @@ export class ProChannelListComponent implements OnInit, OnDestroy {
this.period = params['period'] || '';
this.selectedHashtag = params['hashtag'] || 'all';
this.entities$ = this.feedsService.feed.pipe(
map((elements: BehaviorSubject<any>[]) => {
return elements.filter((element: BehaviorSubject<any>) => {
const entity = element.getValue();
return (
!!entity.thumbnail_src ||
!!entity.custom_data ||
(entity.thumbnails && entity.thumbnails.length > 0)
);
});
})
);
this.setTitle();
this.load(true);
......
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