X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fshared-main%2Fangular%2Finfinite-scroller.directive.ts;h=c247cfde2d92f39d0a1a7dced6728a188960d5cf;hb=dec437aa46a644fb1b3cedc9afe4503c44e15308;hp=bebc6efa7d06f4fc8809c9de81a4f7d6454eebea;hpb=dd24f1bb0a4b252e5342b251ba36853364da7b8e;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/shared/shared-main/angular/infinite-scroller.directive.ts b/client/src/app/shared/shared-main/angular/infinite-scroller.directive.ts index bebc6efa7..c247cfde2 100644 --- a/client/src/app/shared/shared-main/angular/infinite-scroller.directive.ts +++ b/client/src/app/shared/shared-main/angular/infinite-scroller.directive.ts @@ -13,6 +13,7 @@ export class InfiniteScrollerDirective implements OnInit, OnDestroy, AfterViewCh // Add angular state in query params to reuse the routed component @Input() setAngularState: boolean + @Input() parentDisabled = false @Output() nearOfBottom = new EventEmitter() @@ -74,7 +75,7 @@ export class InfiniteScrollerDirective implements OnInit, OnDestroy, AfterViewCh filter(({ current, maximumScroll }) => (current / maximumScroll) > this.decimalLimit) ) .subscribe(() => { - if (this.setAngularState) this.setScrollRouteParams() + if (this.setAngularState && !this.parentDisabled) this.setScrollRouteParams() this.nearOfBottom.emit() })