+ activateCopiedMessage () {
+ this.notifier.success($localize`Username copied`)
+ }
+
+ searchChanged (search: string) {
+ const queryParams = { search }
+
+ this.router.navigate([ './videos' ], { queryParams, relativeTo: this.route, queryParamsHandling: 'merge' })
+ }
+
+ onSearchInputDisplayChanged (displayed: boolean) {
+ this.hideMenu = this.isInSmallView() && displayed
+ }
+
+ hasVideoChannels () {
+ return this.videoChannels.length !== 0
+ }
+
+ hasShowMoreDescription () {
+ return !this.accountDescriptionExpanded && this.accountDescriptionHTML.length > 100
+ }
+
+ isOnChannelPage () {
+ return this.route.children[0].snapshot.url[0].path === 'video-channels'
+ }
+
+ private async onAccount (account: Account) {
+ this.accountDescriptionHTML = await this.markdown.textMarkdownToHTML(account.description)
+
+ // After the markdown renderer to avoid layout changes
+ this.account = account
+
+ this.updateModerationActions()
+ this.loadUserIfNeeded(account)
+ this.loadAccountVideosCount()
+ this.loadAccountBlockStatus()
+ }
+
+ private showReportModal () {
+ this.accountReportModal.show(this.account)
+ }
+
+ private loadUserIfNeeded (account: Account) {
+ if (!account.userId || !this.authService.isLoggedIn()) return