Fix subscribe hotkey
This commit is contained in:
parent
6419509bde
commit
77d873c56d
3 changed files with 9 additions and 2 deletions
|
@ -696,7 +696,10 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
|
||||||
if (this.isUserLoggedIn()) {
|
if (this.isUserLoggedIn()) {
|
||||||
this.hotkeys = this.hotkeys.concat([
|
this.hotkeys = this.hotkeys.concat([
|
||||||
new Hotkey('shift+s', () => {
|
new Hotkey('shift+s', () => {
|
||||||
this.subscribeButton.subscribed ? this.subscribeButton.unsubscribe() : this.subscribeButton.subscribe()
|
this.subscribeButton.isSubscribedToAll()
|
||||||
|
? this.subscribeButton.unsubscribe()
|
||||||
|
: this.subscribeButton.subscribe()
|
||||||
|
|
||||||
return false
|
return false
|
||||||
}, undefined, $localize`Subscribe to the account`)
|
}, undefined, $localize`Subscribe to the account`)
|
||||||
])
|
])
|
||||||
|
|
|
@ -164,6 +164,10 @@ export class SubscribeButtonComponent implements OnInit, OnChanges {
|
||||||
return accumulator
|
return accumulator
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isSubscribedToAll () {
|
||||||
|
return Array.from(this.subscribed.values()).every(v => v === true)
|
||||||
|
}
|
||||||
|
|
||||||
private getChannelHandler (videoChannel: VideoChannel) {
|
private getChannelHandler (videoChannel: VideoChannel) {
|
||||||
return videoChannel.name + '@' + videoChannel.host
|
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 () {
|
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)
|
await wait(3000)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue