Add web linking and proper share controls
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import React, {useRef} from 'react'
|
||||
import {
|
||||
Share,
|
||||
StyleProp,
|
||||
StyleSheet,
|
||||
Text,
|
||||
@@ -12,8 +13,9 @@ import {IconProp} from '@fortawesome/fontawesome-svg-core'
|
||||
import RootSiblings from 'react-native-root-siblings'
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||
import {colors} from '../../lib/styles'
|
||||
import {toShareUrl} from '../../lib/strings'
|
||||
import {useStores} from '../../../state'
|
||||
import {SharePostModel, ConfirmModel} from '../../../state/models/shell-ui'
|
||||
import {ConfirmModel} from '../../../state/models/shell-ui'
|
||||
|
||||
export interface DropdownItem {
|
||||
icon?: IconProp
|
||||
@@ -93,7 +95,7 @@ export function PostDropdownBtn({
|
||||
icon: 'share',
|
||||
label: 'Share...',
|
||||
onPress() {
|
||||
store.shell.openModal(new SharePostModel(itemHref))
|
||||
Share.share({url: toShareUrl(itemHref)})
|
||||
},
|
||||
},
|
||||
isAuthor
|
||||
|
||||
@@ -10,7 +10,6 @@ import {
|
||||
} from 'react-native'
|
||||
import {useStores} from '../../../state'
|
||||
import {RootStoreModel} from '../../../state'
|
||||
import {LinkActionsModel} from '../../../state/models/shell-ui'
|
||||
|
||||
export const Link = observer(function Link({
|
||||
style,
|
||||
|
||||
Reference in New Issue
Block a user