]> cat aescling's git repositories - mastodon.git/commitdiff
[Glitch] Change “hide/show boosts from …” menu to be hidden when the account is muted
authorThibG <thib@sitedethib.com>
Wed, 13 May 2020 19:20:45 +0000 (21:20 +0200)
committerThibaut Girka <thib@sitedethib.com>
Wed, 13 May 2020 21:17:10 +0000 (23:17 +0200)
Port 92f85bea528c5eca97a2f075c53f7dcafdf5cb41 to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
app/javascript/flavours/glitch/features/account/components/header.js

index fb0f165ff4f240bdb493050e6c802d3f5e0e149f..c7b54649c914ecaf9bbb42c7299993e40ebd512a 100644 (file)
@@ -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 });