Commit dfaa496d authored by Mark Harding's avatar Mark Harding

(fix): check visibility needs to be bound

parent cef7c142
No related merge requests found
Pipeline #84963225 passed with stages
in 50 minutes and 38 seconds
......@@ -28,6 +28,8 @@ export class ActivityAnalyticsOnViewService implements OnDestroy {
setElementRef(elementRef: ElementRef | null) {
this.element = (elementRef && elementRef.nativeElement) || void 0;
// Do a check for the initial posts
this.checkVisibility();
return this;
}
......@@ -61,10 +63,9 @@ export class ActivityAnalyticsOnViewService implements OnDestroy {
}
});
this.scroll$ = this.scroll.listenForView().subscribe(this.checkVisibility);
// Do a check for the initial posts
this.checkVisibility();
this.scroll$ = this.scroll.listenForView().subscribe(() => {
this.checkVisibility();
});
}
checkVisibility() {
......
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