diff options
author | Chocobozzz <me@florianbigard.com> | 2019-06-07 15:04:41 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-06-07 15:04:41 +0200 |
commit | b91bc1d1f3591c35ab4426f6ab594b4bd9f1ef62 (patch) | |
tree | 754bb49026d4df8086030e28a8a7c16e3f0338b6 /client/src/app/shared/user-subscription/subscribe-button.component.ts | |
parent | 851f5daa1eec66e1faa3c45238ec9ab91be05b00 (diff) | |
parent | 03371ad9d049bab79445a1b35da44cb1272f6c28 (diff) | |
download | PeerTube-b91bc1d1f3591c35ab4426f6ab594b4bd9f1ef62.tar.gz PeerTube-b91bc1d1f3591c35ab4426f6ab594b4bd9f1ef62.tar.zst PeerTube-b91bc1d1f3591c35ab4426f6ab594b4bd9f1ef62.zip |
Merge branch 'release/v1.3.0' into develop
Diffstat (limited to 'client/src/app/shared/user-subscription/subscribe-button.component.ts')
-rw-r--r-- | client/src/app/shared/user-subscription/subscribe-button.component.ts | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/client/src/app/shared/user-subscription/subscribe-button.component.ts b/client/src/app/shared/user-subscription/subscribe-button.component.ts index ef470ee44..25515f6ea 100644 --- a/client/src/app/shared/user-subscription/subscribe-button.component.ts +++ b/client/src/app/shared/user-subscription/subscribe-button.component.ts | |||
@@ -28,19 +28,19 @@ export class SubscribeButtonComponent implements OnInit { | |||
28 | private videoService: VideoService | 28 | private videoService: VideoService |
29 | ) { } | 29 | ) { } |
30 | 30 | ||
31 | get uri () { | 31 | get channelHandle () { |
32 | return this.videoChannel.name + '@' + this.videoChannel.host | 32 | return this.videoChannel.name + '@' + this.videoChannel.host |
33 | } | 33 | } |
34 | 34 | ||
35 | get uriAccount () { | 35 | get channelUri () { |
36 | return this.videoChannel.ownerAccount.name + '@' + this.videoChannel.host | 36 | return this.videoChannel.url |
37 | } | 37 | } |
38 | 38 | ||
39 | ngOnInit () { | 39 | ngOnInit () { |
40 | if (this.isUserLoggedIn()) { | 40 | if (this.isUserLoggedIn()) { |
41 | this.userSubscriptionService.doesSubscriptionExist(this.uri) | 41 | this.userSubscriptionService.doesSubscriptionExist(this.channelHandle) |
42 | .subscribe( | 42 | .subscribe( |
43 | res => this.subscribed = res[this.uri], | 43 | res => this.subscribed = res[this.channelHandle], |
44 | 44 | ||
45 | err => this.notifier.error(err.message) | 45 | err => this.notifier.error(err.message) |
46 | ) | 46 | ) |
@@ -56,7 +56,7 @@ export class SubscribeButtonComponent implements OnInit { | |||
56 | } | 56 | } |
57 | 57 | ||
58 | localSubscribe () { | 58 | localSubscribe () { |
59 | this.userSubscriptionService.addSubscription(this.uri) | 59 | this.userSubscriptionService.addSubscription(this.channelHandle) |
60 | .subscribe( | 60 | .subscribe( |
61 | () => { | 61 | () => { |
62 | this.subscribed = true | 62 | this.subscribed = true |
@@ -78,7 +78,7 @@ export class SubscribeButtonComponent implements OnInit { | |||
78 | } | 78 | } |
79 | 79 | ||
80 | localUnsubscribe () { | 80 | localUnsubscribe () { |
81 | this.userSubscriptionService.deleteSubscription(this.uri) | 81 | this.userSubscriptionService.deleteSubscription(this.channelHandle) |
82 | .subscribe( | 82 | .subscribe( |
83 | () => { | 83 | () => { |
84 | this.subscribed = false | 84 | this.subscribed = false |