- private getUserIfNeeded (account: Account) {
- if (!account.userId) return
- if (!this.authService.isLoggedIn()) return
+ 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({
+ markdown: account.description,
+ withEmoji: true,
+ withHtml: true
+ })
+
+ // 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