- return this.i18n('{count, plural, =1 {1 subscriber} other {{{count}} subscribers}}', { count })
+ if (count === 1) return $localize`1 subscriber`
+
+ return $localize`${count} subscribers`
+ }
+
+ onOutletLoaded (component: Component) {
+ if (component instanceof AccountSearchComponent) {
+ this.accountSearch = component
+ } else {
+ this.accountSearch = undefined
+ }
+ }
+
+ searchChanged (search: string) {
+ if (this.accountSearch) this.accountSearch.updateSearch(search)
+ }
+
+ onSearchInputDisplayChanged (displayed: boolean) {
+ this.hideMenu = this.isInSmallView() && displayed
+ }
+
+ hasVideoChannels () {
+ return this.videoChannels.length !== 0
+ }
+
+ private async onAccount (account: Account) {
+ this.accountFollowerTitle = $localize`${account.followersCount} direct account followers`
+
+ this.prependModerationActions = undefined
+
+ 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()