From d147dd7588502f22ac825780bb1d6e54eb3613e6 Mon Sep 17 00:00:00 2001 From: ThibG Date: Wed, 13 May 2020 21:20:45 +0200 Subject: [PATCH] =?UTF-8?q?[Glitch]=20Change=20=E2=80=9Chide/show=20boosts?= =?UTF-8?q?=20from=20=E2=80=A6=E2=80=9D=20menu=20to=20be=20hidden=20when?= =?UTF-8?q?=20the=20account=20is=20muted?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Port 92f85bea528c5eca97a2f075c53f7dcafdf5cb41 to glitch-soc Signed-off-by: Thibaut Girka --- .../glitch/features/account/components/header.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/javascript/flavours/glitch/features/account/components/header.js b/app/javascript/flavours/glitch/features/account/components/header.js index fb0f165ff..c7b54649c 100644 --- a/app/javascript/flavours/glitch/features/account/components/header.js +++ b/app/javascript/flavours/glitch/features/account/components/header.js @@ -186,10 +186,12 @@ class Header extends ImmutablePureComponent { menu.push({ text: intl.formatMessage(messages.domain_blocks), to: '/domain_blocks' }); } else { if (account.getIn(['relationship', 'following'])) { - if (account.getIn(['relationship', 'showing_reblogs'])) { - menu.push({ text: intl.formatMessage(messages.hideReblogs, { name: account.get('username') }), action: this.props.onReblogToggle }); - } else { - menu.push({ text: intl.formatMessage(messages.showReblogs, { name: account.get('username') }), action: this.props.onReblogToggle }); + if (!account.getIn(['relationship', 'muting'])) { + if (account.getIn(['relationship', 'showing_reblogs'])) { + menu.push({ text: intl.formatMessage(messages.hideReblogs, { name: account.get('username') }), action: this.props.onReblogToggle }); + } else { + menu.push({ text: intl.formatMessage(messages.showReblogs, { name: account.get('username') }), action: this.props.onReblogToggle }); + } } menu.push({ text: intl.formatMessage(account.getIn(['relationship', 'endorsed']) ? messages.unendorse : messages.endorse), action: this.props.onEndorseToggle });