From 80badf493afca026bc542260f353210e605a1715 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 6 Dec 2021 16:53:00 +0100 Subject: Add mute status in account and channel pages --- client/src/app/shared/shared-main/account/account.model.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'client/src/app/shared/shared-main') diff --git a/client/src/app/shared/shared-main/account/account.model.ts b/client/src/app/shared/shared-main/account/account.model.ts index 92606e7fa..8b78d01a6 100644 --- a/client/src/app/shared/shared-main/account/account.model.ts +++ b/client/src/app/shared/shared-main/account/account.model.ts @@ -1,4 +1,4 @@ -import { Account as ServerAccount, ActorImage } from '@shared/models' +import { Account as ServerAccount, ActorImage, BlockStatus } from '@shared/models' import { Actor } from './actor.model' export class Account extends Actor implements ServerAccount { @@ -49,4 +49,11 @@ export class Account extends Actor implements ServerAccount { resetAvatar () { this.avatar = null } + + updateBlockStatus (blockStatus: BlockStatus) { + this.mutedByInstance = blockStatus.accounts[this.nameWithHostForced].blockedByServer + this.mutedByUser = blockStatus.accounts[this.nameWithHostForced].blockedByUser + this.mutedServerByUser = blockStatus.hosts[this.host].blockedByUser + this.mutedServerByInstance = blockStatus.hosts[this.host].blockedByServer + } } -- cgit v1.2.3