diff options
author | Chocobozzz <me@florianbigard.com> | 2019-08-02 14:49:25 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-08-02 14:49:25 +0200 |
commit | ad453580b20056fd80b3245d4db554f5ca1a5e29 (patch) | |
tree | ed07a6dbd8bc8cd27b22cd33dabcbd3d31deea07 /client/src/app/shared/video/abstract-video-list.ts | |
parent | dd570a34ff731a6cd98ef8f8bf83f234e804f6c1 (diff) | |
download | PeerTube-ad453580b20056fd80b3245d4db554f5ca1a5e29.tar.gz PeerTube-ad453580b20056fd80b3245d4db554f5ca1a5e29.tar.zst PeerTube-ad453580b20056fd80b3245d4db554f5ca1a5e29.zip |
Fix infinite scroll on big screens
Diffstat (limited to 'client/src/app/shared/video/abstract-video-list.ts')
-rw-r--r-- | client/src/app/shared/video/abstract-video-list.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts index 8a247a9af..2926b179b 100644 --- a/client/src/app/shared/video/abstract-video-list.ts +++ b/client/src/app/shared/video/abstract-video-list.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { debounceTime, first, tap } from 'rxjs/operators' | 1 | import { debounceTime, first, tap } from 'rxjs/operators' |
2 | import { OnDestroy, OnInit } from '@angular/core' | 2 | import { OnDestroy, OnInit } from '@angular/core' |
3 | import { ActivatedRoute, Router } from '@angular/router' | 3 | import { ActivatedRoute, Router } from '@angular/router' |
4 | import { fromEvent, Observable, of, Subscription } from 'rxjs' | 4 | import { fromEvent, Observable, of, Subject, Subscription } from 'rxjs' |
5 | import { AuthService } from '../../core/auth' | 5 | import { AuthService } from '../../core/auth' |
6 | import { ComponentPagination } from '../rest/component-pagination.model' | 6 | import { ComponentPagination } from '../rest/component-pagination.model' |
7 | import { VideoSortField } from './sort-field.type' | 7 | import { VideoSortField } from './sort-field.type' |
@@ -59,6 +59,8 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy, DisableFor | |||
59 | blacklistInfo: false | 59 | blacklistInfo: false |
60 | } | 60 | } |
61 | 61 | ||
62 | onDataSubject = new Subject<any[]>() | ||
63 | |||
62 | protected abstract notifier: Notifier | 64 | protected abstract notifier: Notifier |
63 | protected abstract authService: AuthService | 65 | protected abstract authService: AuthService |
64 | protected abstract route: ActivatedRoute | 66 | protected abstract route: ActivatedRoute |
@@ -147,6 +149,8 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy, DisableFor | |||
147 | if (this.groupByDate) this.buildGroupedDateLabels() | 149 | if (this.groupByDate) this.buildGroupedDateLabels() |
148 | 150 | ||
149 | this.onMoreVideos() | 151 | this.onMoreVideos() |
152 | |||
153 | this.onDataSubject.next(data) | ||
150 | }, | 154 | }, |
151 | 155 | ||
152 | error => this.notifier.error(error.message) | 156 | error => this.notifier.error(error.message) |