diff options
Diffstat (limited to 'src/view')
-rw-r--r-- | src/view/com/composer/ComposePost.tsx | 2 | ||||
-rw-r--r-- | src/view/com/profile/ProfileHeader.tsx | 9 | ||||
-rw-r--r-- | src/view/com/util/PostEmbeds.tsx | 2 |
3 files changed, 8 insertions, 5 deletions
diff --git a/src/view/com/composer/ComposePost.tsx b/src/view/com/composer/ComposePost.tsx index 228b11035..a8def6405 100644 --- a/src/view/com/composer/ComposePost.tsx +++ b/src/view/com/composer/ComposePost.tsx @@ -94,7 +94,7 @@ export const ComposePost = observer(function ComposePost({ return cleanup } if (!extLink.meta) { - getLinkMeta(extLink.uri).then(meta => { + getLinkMeta(store, extLink.uri).then(meta => { if (aborted) { return } diff --git a/src/view/com/profile/ProfileHeader.tsx b/src/view/com/profile/ProfileHeader.tsx index 3982637fc..c14a5c827 100644 --- a/src/view/com/profile/ProfileHeader.tsx +++ b/src/view/com/profile/ProfileHeader.tsx @@ -1,6 +1,7 @@ import React from 'react' import {observer} from 'mobx-react-lite' import { + Share, StyleSheet, TouchableOpacity, TouchableWithoutFeedback, @@ -16,7 +17,7 @@ import { ReportAccountModal, ProfileImageLightbox, } from '../../../state/models/shell-ui' -import {pluralize} from '../../../lib/strings' +import {pluralize, toShareUrl} from '../../../lib/strings' import {s, gradients} from '../../lib/styles' import {DropdownButton, DropdownItem} from '../util/forms/DropdownButton' import * as Toast from '../util/Toast' @@ -66,6 +67,9 @@ export const ProfileHeader = observer(function ProfileHeader({ const onPressFollows = () => { store.nav.navigate(`/profile/${view.handle}/follows`) } + const onPressShare = () => { + Share.share({url: toShareUrl(`/profile/${view.handle}`)}) + } const onPressMuteAccount = async () => { try { await view.muteAccount() @@ -133,9 +137,8 @@ export const ProfileHeader = observer(function ProfileHeader({ // loaded // = const isMe = store.me.did === view.did - let dropdownItems: DropdownItem[] | undefined + let dropdownItems: DropdownItem[] = [{label: 'Share', onPress: onPressShare}] if (!isMe) { - dropdownItems = dropdownItems || [] dropdownItems.push({ label: view.myState.muted ? 'Unmute Account' : 'Mute Account', onPress: view.myState.muted ? onPressUnmuteAccount : onPressMuteAccount, diff --git a/src/view/com/util/PostEmbeds.tsx b/src/view/com/util/PostEmbeds.tsx index 3fb93ed48..65518470a 100644 --- a/src/view/com/util/PostEmbeds.tsx +++ b/src/view/com/util/PostEmbeds.tsx @@ -92,7 +92,7 @@ export function PostEmbeds({ /> )} <View style={styles.extInner}> - <Text type="sm-bold" numberOfLines={2} style={[pal.text]}> + <Text type="md-bold" numberOfLines={2} style={[pal.text]}> {link.title || link.uri} </Text> <Text |