diff options
Diffstat (limited to 'client/src/app/+my-account/my-account-subscriptions')
2 files changed, 6 insertions, 1 deletions
diff --git a/client/src/app/+my-account/my-account-subscriptions/my-account-subscriptions.component.html b/client/src/app/+my-account/my-account-subscriptions/my-account-subscriptions.component.html index fc23053c8..ce43ed6dd 100644 --- a/client/src/app/+my-account/my-account-subscriptions/my-account-subscriptions.component.html +++ b/client/src/app/+my-account/my-account-subscriptions/my-account-subscriptions.component.html | |||
@@ -1,6 +1,6 @@ | |||
1 | <div class="no-results" i18n *ngIf="pagination.totalItems === 0">You don't have any subscriptions yet.</div> | 1 | <div class="no-results" i18n *ngIf="pagination.totalItems === 0">You don't have any subscriptions yet.</div> |
2 | 2 | ||
3 | <div class="video-channels" myInfiniteScroller [autoInit]="true" (nearOfBottom)="onNearOfBottom()"> | 3 | <div class="video-channels" myInfiniteScroller [autoInit]="true" (nearOfBottom)="onNearOfBottom()" [dataObservable]="onDataSubject.asObservable()"> |
4 | <div *ngFor="let videoChannel of videoChannels" class="video-channel"> | 4 | <div *ngFor="let videoChannel of videoChannels" class="video-channel"> |
5 | <a [routerLink]="[ '/video-channels', videoChannel.nameWithHost ]"> | 5 | <a [routerLink]="[ '/video-channels', videoChannel.nameWithHost ]"> |
6 | <img [src]="videoChannel.avatarUrl" alt="Avatar" /> | 6 | <img [src]="videoChannel.avatarUrl" alt="Avatar" /> |
diff --git a/client/src/app/+my-account/my-account-subscriptions/my-account-subscriptions.component.ts b/client/src/app/+my-account/my-account-subscriptions/my-account-subscriptions.component.ts index 6ce22989b..b347fc3fe 100644 --- a/client/src/app/+my-account/my-account-subscriptions/my-account-subscriptions.component.ts +++ b/client/src/app/+my-account/my-account-subscriptions/my-account-subscriptions.component.ts | |||
@@ -3,6 +3,7 @@ import { Notifier } from '@app/core' | |||
3 | import { VideoChannel } from '@app/shared/video-channel/video-channel.model' | 3 | import { VideoChannel } from '@app/shared/video-channel/video-channel.model' |
4 | import { UserSubscriptionService } from '@app/shared/user-subscription' | 4 | import { UserSubscriptionService } from '@app/shared/user-subscription' |
5 | import { ComponentPagination } from '@app/shared/rest/component-pagination.model' | 5 | import { ComponentPagination } from '@app/shared/rest/component-pagination.model' |
6 | import { Subject } from 'rxjs' | ||
6 | 7 | ||
7 | @Component({ | 8 | @Component({ |
8 | selector: 'my-account-subscriptions', | 9 | selector: 'my-account-subscriptions', |
@@ -18,6 +19,8 @@ export class MyAccountSubscriptionsComponent implements OnInit { | |||
18 | totalItems: null | 19 | totalItems: null |
19 | } | 20 | } |
20 | 21 | ||
22 | onDataSubject = new Subject<any[]>() | ||
23 | |||
21 | constructor ( | 24 | constructor ( |
22 | private userSubscriptionService: UserSubscriptionService, | 25 | private userSubscriptionService: UserSubscriptionService, |
23 | private notifier: Notifier | 26 | private notifier: Notifier |
@@ -33,6 +36,8 @@ export class MyAccountSubscriptionsComponent implements OnInit { | |||
33 | res => { | 36 | res => { |
34 | this.videoChannels = this.videoChannels.concat(res.data) | 37 | this.videoChannels = this.videoChannels.concat(res.data) |
35 | this.pagination.totalItems = res.total | 38 | this.pagination.totalItems = res.total |
39 | |||
40 | this.onDataSubject.next(res.data) | ||
36 | }, | 41 | }, |
37 | 42 | ||
38 | error => this.notifier.error(error.message) | 43 | error => this.notifier.error(error.message) |