diff --git a/app/soapbox/features/account/components/header.js b/app/soapbox/features/account/components/header.js
index 7db81e2fc..e535959ee 100644
--- a/app/soapbox/features/account/components/header.js
+++ b/app/soapbox/features/account/components/header.js
@@ -255,6 +255,7 @@ class Header extends ImmutablePureComponent {
);
}
+ const self = account.get('id') === me;
const info = this.makeInfo();
const menu = this.makeMenu();
@@ -286,18 +287,18 @@ class Header extends ImmutablePureComponent {
-
- {shortNumberFormat(account.get('following_count'))}
+ {(self || !account.getIn(['pleroma', 'hide_follows'], false)) &&
+ {account.getIn(['pleroma', 'hide_follows_count'], false) ? • : {shortNumberFormat(account.get('following_count'))}}
-
+ }
-
- {shortNumberFormat(account.get('followers_count'))}
+ {(self || !account.getIn(['pleroma', 'hide_followers'], false)) &&
+ {account.getIn(['pleroma', 'hide_followers_count'], false) ? • : {shortNumberFormat(account.get('followers_count'))}}
-
+ }
{
- account.get('id') === me &&
+ self &&
{
+ const pleroma = account.get('pleroma');
+ if (!pleroma) return false;
+
+ const { hide_followers, hide_follows, hide_followers_count, hide_follows_count } = pleroma.toJS();
+ return hide_followers && hide_follows && hide_followers_count && hide_follows_count;
+};
+
const messages = defineMessages({
heading: { id: 'column.edit_profile', defaultMessage: 'Edit profile' },
metaFieldLabel: { id: 'edit_profile.fields.meta_fields.label_placeholder', defaultMessage: 'Label' },
@@ -87,6 +95,7 @@ class EditProfile extends ImmutablePureComponent {
map.set('fields', normalizeFields(map.get('fields'), props.maxFields));
map.set('stranger_notifications', strangerNotifications);
map.set('accepts_email_list', acceptsEmailList);
+ map.set('hide_network', hidesNetwork(account));
unescapeParams(map, ['display_name', 'bio']);
});
this.state = initialState.toObject();
@@ -122,6 +131,10 @@ class EditProfile extends ImmutablePureComponent {
header: state.header_file,
locked: state.locked,
accepts_email_list: state.accepts_email_list,
+ hide_followers: state.hide_network,
+ hide_follows: state.hide_network,
+ hide_followers_count: state.hide_network,
+ hide_follows_count: state.hide_network,
}, this.getFieldParams().toJS());
}
@@ -237,6 +250,13 @@ class EditProfile extends ImmutablePureComponent {
checked={this.state.locked}
onChange={this.handleCheckboxChange}
/>
+ }
+ hint={}
+ name='hide_network'
+ checked={this.state.hide_network}
+ onChange={this.handleCheckboxChange}
+ />
}
hint={}