aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+accounts/accounts.component.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-01-08 22:13:47 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-01-10 10:12:09 +0100
commit9270ccf6dca5b2955ad126947d4296deb385fdcb (patch)
tree120807348c51437aaa35e52bed9122cdfc08437f /client/src/app/+accounts/accounts.component.ts
parentb061c8edb053d4a7a02f09d93d406f6a8c58006e (diff)
downloadPeerTube-9270ccf6dca5b2955ad126947d4296deb385fdcb.tar.gz
PeerTube-9270ccf6dca5b2955ad126947d4296deb385fdcb.tar.zst
PeerTube-9270ccf6dca5b2955ad126947d4296deb385fdcb.zip
Make subscribe buttons observe subscription statuses to synchronise
Diffstat (limited to 'client/src/app/+accounts/accounts.component.ts')
-rw-r--r--client/src/app/+accounts/accounts.component.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/client/src/app/+accounts/accounts.component.ts b/client/src/app/+accounts/accounts.component.ts
index e3a503f4c..8bde7ad07 100644
--- a/client/src/app/+accounts/accounts.component.ts
+++ b/client/src/app/+accounts/accounts.component.ts
@@ -40,15 +40,15 @@ export class AccountsComponent implements OnInit, OnDestroy {
40 map(params => params[ 'accountId' ]), 40 map(params => params[ 'accountId' ]),
41 distinctUntilChanged(), 41 distinctUntilChanged(),
42 switchMap(accountId => this.accountService.getAccount(accountId)), 42 switchMap(accountId => this.accountService.getAccount(accountId)),
43 tap(account => this.getUserIfNeeded(account)), 43 tap(account => {
44 this.account = account
45 this.getUserIfNeeded(account)
46 }),
47 switchMap(account => this.videoChannelService.listAccountVideoChannels(account)),
44 catchError(err => this.restExtractor.redirectTo404IfNotFound(err, [ 400, 404 ])) 48 catchError(err => this.restExtractor.redirectTo404IfNotFound(err, [ 400, 404 ]))
45 ) 49 )
46 .subscribe( 50 .subscribe(
47 account => { 51 videoChannels => this.videoChannels = videoChannels.data,
48 this.account = account
49 this.videoChannelService.listAccountVideoChannels(account)
50 .subscribe(videoChannels => this.videoChannels = videoChannels.data)
51 },
52 52
53 err => this.notifier.error(err.message) 53 err => this.notifier.error(err.message)
54 ) 54 )