mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-23 17:44:24 +00:00
Fix “Share @{name}'s profile” profile menu item (#21490)
This commit is contained in:
parent
098ced7420
commit
fe421257e5
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue