+ activateCopiedMessage () {
+ this.notifier.success(this.i18n('Username copied'))
+ }
+
+ subscribersDisplayFor (count: number) {
+ return this.i18n('{count, plural, =1 {1 subscriber} other {{{count}} subscribers}}', { count })
+ }
+
+ private onAccount (account: Account) {
+ this.prependModerationActions = undefined
+
+ this.account = account
+
+ if (this.authService.isLoggedIn()) {
+ this.authService.userInformationLoaded.subscribe(
+ () => {
+ this.isAccountManageable = this.account.userId && this.account.userId === this.authService.getUser().id
+
+ this.accountFollowerTitle = this.i18n(
+ '{{followers}} direct account followers',
+ { followers: this.subscribersDisplayFor(account.followersCount) }
+ )
+
+ // It's not our account, we can report it
+ if (!this.isAccountManageable) {
+ this.prependModerationActions = [
+ {
+ label: this.i18n('Report account'),
+ handler: () => this.showReportModal()
+ }
+ ]
+ }
+ }
+ )
+ }
+
+ this.getUserIfNeeded(account)
+ }
+
+ private showReportModal () {
+ this.accountReportModal.show()
+ }
+