diff options
author | Chocobozzz <me@florianbigard.com> | 2021-10-08 15:59:05 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-10-11 09:37:27 +0200 |
commit | 0af2a8c5d62bc1764fc296caa67c33195a7d5174 (patch) | |
tree | fef575d42e970bf6aeb2bb17463ad2c460c799c0 /client/src/app/shared/shared-main | |
parent | 9db2330e4a32a3bb0fe821abec1b061e4edb65b5 (diff) | |
download | PeerTube-0af2a8c5d62bc1764fc296caa67c33195a7d5174.tar.gz PeerTube-0af2a8c5d62bc1764fc296caa67c33195a7d5174.tar.zst PeerTube-0af2a8c5d62bc1764fc296caa67c33195a7d5174.zip |
Correctly disable infinite scroll for reuse
Diffstat (limited to 'client/src/app/shared/shared-main')
-rw-r--r-- | client/src/app/shared/shared-main/angular/infinite-scroller.directive.ts | 3 |
1 files changed, 2 insertions, 1 deletions
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 | |||
13 | 13 | ||
14 | // Add angular state in query params to reuse the routed component | 14 | // Add angular state in query params to reuse the routed component |
15 | @Input() setAngularState: boolean | 15 | @Input() setAngularState: boolean |
16 | @Input() parentDisabled = false | ||
16 | 17 | ||
17 | @Output() nearOfBottom = new EventEmitter<void>() | 18 | @Output() nearOfBottom = new EventEmitter<void>() |
18 | 19 | ||
@@ -74,7 +75,7 @@ export class InfiniteScrollerDirective implements OnInit, OnDestroy, AfterViewCh | |||
74 | filter(({ current, maximumScroll }) => (current / maximumScroll) > this.decimalLimit) | 75 | filter(({ current, maximumScroll }) => (current / maximumScroll) > this.decimalLimit) |
75 | ) | 76 | ) |
76 | .subscribe(() => { | 77 | .subscribe(() => { |
77 | if (this.setAngularState) this.setScrollRouteParams() | 78 | if (this.setAngularState && !this.parentDisabled) this.setScrollRouteParams() |
78 | 79 | ||
79 | this.nearOfBottom.emit() | 80 | this.nearOfBottom.emit() |
80 | }) | 81 | }) |