remove endorse button from the profile header menu and some related funcs, fixes #328

This commit is contained in:
Mary Kate 2020-08-16 00:23:06 -05:00
parent 30ebdf30ff
commit 9864966eb0
3 changed files with 13 additions and 13 deletions

View file

@ -132,7 +132,7 @@ class Header extends ImmutablePureComponent {
}
menu.push({ text: intl.formatMessage(messages.add_or_remove_from_list), action: this.props.onAddToList });
menu.push({ text: intl.formatMessage(account.getIn(['relationship', 'endorsed']) ? messages.unendorse : messages.endorse), action: this.props.onEndorseToggle });
// menu.push({ text: intl.formatMessage(account.getIn(['relationship', 'endorsed']) ? messages.unendorse : messages.endorse), action: this.props.onEndorseToggle });
menu.push(null);
} else if (version.software === 'Pleroma') {
menu.push({ text: intl.formatMessage(messages.add_or_remove_from_list), action: this.props.onAddToList });

View file

@ -72,9 +72,9 @@ export default class Header extends ImmutablePureComponent {
this.props.onUnblockDomain(domain);
}
handleEndorseToggle = () => {
this.props.onEndorseToggle(this.props.account);
}
// handleEndorseToggle = () => {
// this.props.onEndorseToggle(this.props.account);
// }
handleAddToList = () => {
this.props.onAddToList(this.props.account);

View file

@ -8,8 +8,8 @@ import {
blockAccount,
unblockAccount,
unmuteAccount,
pinAccount,
unpinAccount,
// pinAccount,
// unpinAccount,
} from '../../../actions/accounts';
import {
mentionCompose,
@ -95,13 +95,13 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
}
},
onEndorseToggle(account) {
if (account.getIn(['relationship', 'endorsed'])) {
dispatch(unpinAccount(account.get('id')));
} else {
dispatch(pinAccount(account.get('id')));
}
},
// onEndorseToggle(account) {
// if (account.getIn(['relationship', 'endorsed'])) {
// dispatch(unpinAccount(account.get('id')));
// } else {
// dispatch(pinAccount(account.get('id')));
// }
// },
onReport(account) {
dispatch(initReport(account));