diff options
Diffstat (limited to 'src/view/com/post/Post.tsx')
-rw-r--r-- | src/view/com/post/Post.tsx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/view/com/post/Post.tsx b/src/view/com/post/Post.tsx index 2996991e7..23ec44c6b 100644 --- a/src/view/com/post/Post.tsx +++ b/src/view/com/post/Post.tsx @@ -8,6 +8,7 @@ import { ViewStyle, } from 'react-native' import {observer} from 'mobx-react-lite' +import Clipboard from '@react-native-clipboard/clipboard' import {AtUri} from '../../../third-party/uri' import * as PostType from '../../../third-party/api/src/client/types/app/bsky/feed/post' import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' @@ -110,6 +111,10 @@ export const Post = observer(function Post({ .toggleUpvote() .catch(e => console.error('Failed to toggle upvote', record, e)) } + const onCopyPostText = () => { + Clipboard.setString(record.text) + Toast.show('Copied to clipboard') + } const onDeletePost = () => { item.delete().then( () => { @@ -144,6 +149,7 @@ export const Post = observer(function Post({ authorDisplayName={item.author.displayName} timestamp={item.indexedAt} isAuthor={item.author.did === store.me.did} + onCopyPostText={onCopyPostText} onDeletePost={onDeletePost} /> {replyHref !== '' && ( |