@@ -51,7 +51,12 @@ import { DomainPill } from 'mastodon/features/account/components/domain_pill';
5151import FollowRequestNoteContainer from 'mastodon/features/account/containers/follow_request_note_container' ;
5252import { useLinks } from 'mastodon/hooks/useLinks' ;
5353import { useIdentity } from 'mastodon/identity_context' ;
54- import { autoPlayGif , me , domain as localDomain } from 'mastodon/initial_state' ;
54+ import {
55+ autoPlayGif ,
56+ me ,
57+ domain as localDomain ,
58+ isHideItem ,
59+ } from 'mastodon/initial_state' ;
5560import type { Account } from 'mastodon/models/account' ;
5661import type { MenuItem } from 'mastodon/models/dropdown_menu' ;
5762import {
@@ -221,6 +226,8 @@ export const AccountHeader: React.FC<{
221226 const hidden = useAppSelector ( ( state ) => getAccountHidden ( state , accountId ) ) ;
222227 const handleLinkClick = useLinks ( ) ;
223228
229+ const isHideRelationships = isHideItem ( 'relationships' ) ;
230+
224231 const handleBlock = useCallback ( ( ) => {
225232 if ( ! account ) {
226233 return ;
@@ -549,15 +556,15 @@ export const AccountHeader: React.FC<{
549556 text : intl . formatMessage ( messages . add_or_remove_from_exclude_antenna ) ,
550557 action : handleAddToExcludeAntenna ,
551558 } ) ;
552- if ( relationship ?. followed_by ) {
559+ if ( ! isHideRelationships && relationship ?. followed_by ) {
553560 arr . push ( {
554561 text : intl . formatMessage ( messages . add_or_remove_from_circle ) ,
555562 action : handleAddToCircle ,
556563 } ) ;
557564 }
558565 arr . push ( null ) ;
559566
560- if ( relationship ?. followed_by ) {
567+ if ( ! isHideRelationships && relationship ?. followed_by ) {
561568 const handleRemoveFromFollowers = ( ) => {
562569 dispatch (
563570 openModal ( {
@@ -710,6 +717,7 @@ export const AccountHeader: React.FC<{
710717 handleReblogToggle ,
711718 handleReport ,
712719 handleUnblockDomain ,
720+ isHideRelationships ,
713721 ] ) ;
714722
715723 if ( ! account ) {
@@ -725,6 +733,7 @@ export const AccountHeader: React.FC<{
725733
726734 if ( me !== account . id && relationship ) {
727735 if (
736+ ! isHideRelationships &&
728737 relationship . followed_by &&
729738 ( relationship . following || relationship . requested )
730739 ) {
@@ -736,7 +745,7 @@ export const AccountHeader: React.FC<{
736745 />
737746 </ span > ,
738747 ) ;
739- } else if ( relationship . followed_by ) {
748+ } else if ( ! isHideRelationships && relationship . followed_by ) {
740749 info . push (
741750 < span key = 'followed_by' className = 'relationship-tag' >
742751 < FormattedMessage
@@ -745,7 +754,7 @@ export const AccountHeader: React.FC<{
745754 />
746755 </ span > ,
747756 ) ;
748- } else if ( relationship . requested_by ) {
757+ } else if ( ! relationship . followed_by && relationship . requested_by ) {
749758 info . push (
750759 < span key = 'requested_by' className = 'relationship-tag' >
751760 < FormattedMessage
0 commit comments