remove endorse button from the profile header menu and some related funcs, fixes #328
This commit is contained in:
parent
30ebdf30ff
commit
9864966eb0
3 changed files with 13 additions and 13 deletions
|
@ -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 });
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue