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/+accounts | |
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/+accounts')
-rw-r--r-- | client/src/app/+accounts/account-video-channels/account-video-channels.component.html | 2 | ||||
-rw-r--r-- | client/src/app/+accounts/account-video-channels/account-video-channels.component.ts | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/client/src/app/+accounts/account-video-channels/account-video-channels.component.html b/client/src/app/+accounts/account-video-channels/account-video-channels.component.html index ea5f61b18..4ebad514c 100644 --- a/client/src/app/+accounts/account-video-channels/account-video-channels.component.html +++ b/client/src/app/+accounts/account-video-channels/account-video-channels.component.html | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | <div class="no-results" i18n *ngIf="channelPagination.totalItems === 0">This account does not have channels.</div> | 3 | <div class="no-results" i18n *ngIf="channelPagination.totalItems === 0">This account does not have channels.</div> |
4 | 4 | ||
5 | <div class="channels" myInfiniteScroller (nearOfBottom)="onNearOfBottom()" [autoInit]="true"> | 5 | <div class="channels" myInfiniteScroller (nearOfBottom)="onNearOfBottom()" [autoInit]="true" [dataObservable]="onChannelDataSubject.asObservable()"> |
6 | <div class="section channel" *ngFor="let videoChannel of videoChannels"> | 6 | <div class="section channel" *ngFor="let videoChannel of videoChannels"> |
7 | <div class="section-title"> | 7 | <div class="section-title"> |
8 | <a [routerLink]="getVideoChannelLink(videoChannel)" i18n-title title="See this video channel"> | 8 | <a [routerLink]="getVideoChannelLink(videoChannel)" i18n-title title="See this video channel"> |
diff --git a/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts b/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts index 7144f4b5f..85dedd7de 100644 --- a/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts +++ b/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts | |||
@@ -4,7 +4,7 @@ import { Account } from '@app/shared/account/account.model' | |||
4 | import { AccountService } from '@app/shared/account/account.service' | 4 | import { AccountService } from '@app/shared/account/account.service' |
5 | import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' | 5 | import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' |
6 | import { concatMap, map, switchMap, tap } from 'rxjs/operators' | 6 | import { concatMap, map, switchMap, tap } from 'rxjs/operators' |
7 | import { from, Subscription } from 'rxjs' | 7 | import { from, Subject, Subscription } from 'rxjs' |
8 | import { VideoChannel } from '@app/shared/video-channel/video-channel.model' | 8 | import { VideoChannel } from '@app/shared/video-channel/video-channel.model' |
9 | import { Video } from '@app/shared/video/video.model' | 9 | import { Video } from '@app/shared/video/video.model' |
10 | import { AuthService } from '@app/core' | 10 | import { AuthService } from '@app/core' |
@@ -33,6 +33,8 @@ export class AccountVideoChannelsComponent implements OnInit, OnDestroy { | |||
33 | } | 33 | } |
34 | videosSort: VideoSortField = '-publishedAt' | 34 | videosSort: VideoSortField = '-publishedAt' |
35 | 35 | ||
36 | onChannelDataSubject = new Subject<any>() | ||
37 | |||
36 | private accountSub: Subscription | 38 | private accountSub: Subscription |
37 | 39 | ||
38 | constructor ( | 40 | constructor ( |
@@ -75,6 +77,8 @@ export class AccountVideoChannelsComponent implements OnInit, OnDestroy { | |||
75 | this.videoChannels.push(videoChannel) | 77 | this.videoChannels.push(videoChannel) |
76 | 78 | ||
77 | this.videos[videoChannel.id] = videos | 79 | this.videos[videoChannel.id] = videos |
80 | |||
81 | this.onChannelDataSubject.next([ videoChannel ]) | ||
78 | }) | 82 | }) |
79 | } | 83 | } |
80 | 84 | ||