Fix subscribe hotkey
This commit is contained in:
parent
6419509bde
commit
77d873c56d
|
@ -696,7 +696,10 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
|
|||
if (this.isUserLoggedIn()) {
|
||||
this.hotkeys = this.hotkeys.concat([
|
||||
new Hotkey('shift+s', () => {
|
||||
this.subscribeButton.subscribed ? this.subscribeButton.unsubscribe() : this.subscribeButton.subscribe()
|
||||
this.subscribeButton.isSubscribedToAll()
|
||||
? this.subscribeButton.unsubscribe()
|
||||
: this.subscribeButton.subscribe()
|
||||
|
||||
return false
|
||||
}, undefined, $localize`Subscribe to the account`)
|
||||
])
|
||||
|
|
|
@ -164,6 +164,10 @@ export class SubscribeButtonComponent implements OnInit, OnChanges {
|
|||
return accumulator
|
||||
}
|
||||
|
||||
isSubscribedToAll () {
|
||||
return Array.from(this.subscribed.values()).every(v => v === true)
|
||||
}
|
||||
|
||||
private getChannelHandler (videoChannel: VideoChannel) {
|
||||
return videoChannel.name + '@' + videoChannel.host
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ describe('Test a videos overview', function () {
|
|||
})
|
||||
|
||||
it('Should upload 5 videos in a specific category, tag and channel but not include them in overview', async function () {
|
||||
this.timeout(15000)
|
||||
this.timeout(30000)
|
||||
|
||||
await wait(3000)
|
||||
|
||||
|
|
Loading…
Reference in New Issue