aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src
diff options
context:
space:
mode:
Diffstat (limited to 'client/src')
-rw-r--r--client/src/app/+videos/video-list/video-user-subscriptions.component.ts21
1 files changed, 12 insertions, 9 deletions
diff --git a/client/src/app/+videos/video-list/video-user-subscriptions.component.ts b/client/src/app/+videos/video-list/video-user-subscriptions.component.ts
index bd0337c1d..6d19707df 100644
--- a/client/src/app/+videos/video-list/video-user-subscriptions.component.ts
+++ b/client/src/app/+videos/video-list/video-user-subscriptions.component.ts
@@ -1,4 +1,5 @@
1 1
2import { switchMap } from 'rxjs/operators'
2import { Component, OnDestroy, OnInit } from '@angular/core' 3import { Component, OnDestroy, OnInit } from '@angular/core'
3import { ActivatedRoute, Router } from '@angular/router' 4import { ActivatedRoute, Router } from '@angular/router'
4import { AuthService, LocalStorageService, Notifier, ScopedTokensService, ScreenService, ServerService, UserService } from '@app/core' 5import { AuthService, LocalStorageService, Notifier, ScopedTokensService, ScreenService, ServerService, UserService } from '@app/core'
@@ -53,16 +54,18 @@ export class VideoUserSubscriptionsComponent extends AbstractVideoList implement
53 const user = this.authService.getUser() 54 const user = this.authService.getUser()
54 let feedUrl = environment.originServerUrl 55 let feedUrl = environment.originServerUrl
55 56
56 this.scopedTokensService.getScopedTokens().subscribe( 57 this.authService.userInformationLoaded
57 tokens => { 58 .pipe(switchMap(() => this.scopedTokensService.getScopedTokens()))
58 const feeds = this.videoService.getVideoSubscriptionFeedUrls(user.account.id, tokens.feedToken) 59 .subscribe(
59 feedUrl = feedUrl + feeds.find(f => f.format === FeedFormat.RSS).url 60 tokens => {
60 }, 61 const feeds = this.videoService.getVideoSubscriptionFeedUrls(user.account.id, tokens.feedToken)
62 feedUrl = feedUrl + feeds.find(f => f.format === FeedFormat.RSS).url
63 },
61 64
62 err => { 65 err => {
63 this.notifier.error(err.message) 66 this.notifier.error(err.message)
64 } 67 }
65 ) 68 )
66 69
67 this.actions.unshift({ 70 this.actions.unshift({
68 label: $localize`Feed`, 71 label: $localize`Feed`,