import { ListOverflowItem, VideoChannel, VideoChannelService, VideoService } from '@app/shared/shared-main'
import { SupportModalComponent } from '@app/shared/shared-support-modal'
import { SubscribeButtonComponent } from '@app/shared/shared-user-subscription'
-import { HttpStatusCode } from '@shared/core-utils/miscs/http-error-codes'
+import { HttpStatusCode } from '@shared/models'
@Component({
templateUrl: './video-channels.component.html',
ngOnInit () {
this.routeSub = this.route.params
.pipe(
- map(params => params[ 'videoChannelName' ]),
+ map(params => params['videoChannelName']),
distinctUntilChanged(),
switchMap(videoChannelName => this.videoChannelService.getVideoChannel(videoChannelName)),
catchError(err => this.restExtractor.redirectTo404IfNotFound(err, 'other', [
this.hotkeys = [
new Hotkey('S', (event: KeyboardEvent): boolean => {
- this.subscribeButton.subscribed ?
- this.subscribeButton.unsubscribe() :
- this.subscribeButton.subscribe()
+ if (this.subscribeButton.subscribed) this.subscribeButton.unsubscribe()
+ else this.subscribeButton.subscribe()
+
return false
}, undefined, $localize`Subscribe to the account`)
]
}
getAccountUrl () {
- return [ '/accounts', this.videoChannel.ownerBy ]
+ return [ '/a', this.videoChannel.ownerBy ]
}
private loadChannelVideosCount () {