diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-11-21 16:07:26 -0600 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-11-21 16:07:26 -0600 |
commit | ed146a582c140b9a472298390dafbc07bd06cf60 (patch) | |
tree | bd540e4a84244fdbdbdf5fde412fc4a179b6dae5 /src/view/shell/mobile/TabsSelector.tsx | |
parent | 39058cd36a9839df0e0c7e30ba486a09e30f169c (diff) | |
download | voidsky-ed146a582c140b9a472298390dafbc07bd06cf60.tar.zst |
Add web linking and proper share controls
Diffstat (limited to 'src/view/shell/mobile/TabsSelector.tsx')
-rw-r--r-- | src/view/shell/mobile/TabsSelector.tsx | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/view/shell/mobile/TabsSelector.tsx b/src/view/shell/mobile/TabsSelector.tsx index 1210da91f..4b246728f 100644 --- a/src/view/shell/mobile/TabsSelector.tsx +++ b/src/view/shell/mobile/TabsSelector.tsx @@ -2,6 +2,7 @@ import React, {createRef, useRef, useMemo, useEffect, useState} from 'react' import {observer} from 'mobx-react-lite' import { ScrollView, + Share, StyleSheet, Text, TouchableWithoutFeedback, @@ -20,8 +21,8 @@ import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' import Swipeable from 'react-native-gesture-handler/Swipeable' import {useStores} from '../../../state' import {s, colors} from '../../lib/styles' +import {toShareUrl} from '../../lib/strings' import {match} from '../../routes' -import {LinkActionsModel} from '../../../state/models/shell-ui' const TAB_HEIGHT = 42 @@ -69,13 +70,7 @@ export const TabsSelector = observer( } const onPressShareTab = () => { onClose() - store.shell.openModal( - new LinkActionsModel( - store.nav.tab.current.url, - store.nav.tab.current.title || 'This Page', - {newTab: false}, - ), - ) + Share.share({url: toShareUrl(store.nav.tab.current.url)}) } const onPressChangeTab = (tabIndex: number) => { store.nav.setActiveTab(tabIndex) |