Skip to content

Commit

Permalink
Fix “Share @{name}'s profile” profile menu item (#21490)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire committed Nov 27, 2022
1 parent 098ced7 commit fe42125
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions app/javascript/mastodon/features/account/components/header.js
Expand Up @@ -149,6 +149,17 @@ class Header extends ImmutablePureComponent {
}
}

handleShare = () => {
const { account } = this.props;

navigator.share({
text: `${titleFromAccount(account)}\n${account.get('note_plain')}`,
url: account.get('url'),
}).catch((e) => {
if (e.name !== 'AbortError') console.error(e);
});
}

render () {
const { account, hidden, intl, domain } = this.props;
const { signedIn } = this.context.identity;
Expand Down

0 comments on commit fe42125

Please sign in to comment.