aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app')
-rw-r--r--client/src/app/+videos/+video-watch/video-watch.component.ts5
-rw-r--r--client/src/app/shared/shared-user-subscription/subscribe-button.component.ts4
2 files changed, 8 insertions, 1 deletions
diff --git a/client/src/app/+videos/+video-watch/video-watch.component.ts b/client/src/app/+videos/+video-watch/video-watch.component.ts
index 85b882225..d078844c3 100644
--- a/client/src/app/+videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/+videos/+video-watch/video-watch.component.ts
@@ -696,7 +696,10 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
696 if (this.isUserLoggedIn()) { 696 if (this.isUserLoggedIn()) {
697 this.hotkeys = this.hotkeys.concat([ 697 this.hotkeys = this.hotkeys.concat([
698 new Hotkey('shift+s', () => { 698 new Hotkey('shift+s', () => {
699 this.subscribeButton.subscribed ? this.subscribeButton.unsubscribe() : this.subscribeButton.subscribe() 699 this.subscribeButton.isSubscribedToAll()
700 ? this.subscribeButton.unsubscribe()
701 : this.subscribeButton.subscribe()
702
700 return false 703 return false
701 }, undefined, $localize`Subscribe to the account`) 704 }, undefined, $localize`Subscribe to the account`)
702 ]) 705 ])
diff --git a/client/src/app/shared/shared-user-subscription/subscribe-button.component.ts b/client/src/app/shared/shared-user-subscription/subscribe-button.component.ts
index b918fda06..2261e07dd 100644
--- a/client/src/app/shared/shared-user-subscription/subscribe-button.component.ts
+++ b/client/src/app/shared/shared-user-subscription/subscribe-button.component.ts
@@ -164,6 +164,10 @@ export class SubscribeButtonComponent implements OnInit, OnChanges {
164 return accumulator 164 return accumulator
165 } 165 }
166 166
167 isSubscribedToAll () {
168 return Array.from(this.subscribed.values()).every(v => v === true)
169 }
170
167 private getChannelHandler (videoChannel: VideoChannel) { 171 private getChannelHandler (videoChannel: VideoChannel) {
168 return videoChannel.name + '@' + videoChannel.host 172 return videoChannel.name + '@' + videoChannel.host
169 } 173 }