From 0af2a8c5d62bc1764fc296caa67c33195a7d5174 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 8 Oct 2021 15:59:05 +0200 Subject: Correctly disable infinite scroll for reuse --- .../src/app/shared/shared-main/angular/infinite-scroller.directive.ts | 3 ++- .../src/app/shared/shared-video-miniature/videos-list.component.html | 3 ++- .../app/shared/shared-video-miniature/videos-selection.component.html | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'client/src/app/shared') 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() }) diff --git a/client/src/app/shared/shared-video-miniature/videos-list.component.html b/client/src/app/shared/shared-video-miniature/videos-list.component.html index 67933f177..2b554517f 100644 --- a/client/src/app/shared/shared-video-miniature/videos-list.component.html +++ b/client/src/app/shared/shared-video-miniature/videos-list.component.html @@ -40,7 +40,8 @@
No results.
diff --git a/client/src/app/shared/shared-video-miniature/videos-selection.component.html b/client/src/app/shared/shared-video-miniature/videos-selection.component.html index f2af874dd..6ea2661e4 100644 --- a/client/src/app/shared/shared-video-miniature/videos-selection.component.html +++ b/client/src/app/shared/shared-video-miniature/videos-selection.component.html @@ -2,7 +2,8 @@
-- cgit v1.2.3