gearheads
/
mastodon
Archived
2
0
Fork 0

Fix “Share @{name}'s profile” profile menu item (#21490)

gh/stable
Claire 2022-11-27 20:42:17 +01:00 committed by GitHub
parent 098ced7420
commit fe421257e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -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;