Share post text to be able to copy
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import React, { useState } from 'react';
|
||||
import { Text, ScrollView, FlatList, StyleSheet, View, Share } from 'react-native';
|
||||
import { Text, Pressable, FlatList, StyleSheet, View, Share } from 'react-native';
|
||||
import Hyperlink from 'react-native-hyperlink'
|
||||
import { Button, Card, Chip } from 'react-native-paper';
|
||||
import API from './../API.js';
|
||||
@@ -82,10 +82,17 @@ let Post = (props) => {
|
||||
{toProfileText}
|
||||
|
||||
</View>
|
||||
|
||||
<Text style={{ fontSize: 16, padding: 3, paddingLeft: 40 }}>{
|
||||
cleanContent
|
||||
}</Text>
|
||||
<Pressable onLongPress={() => {
|
||||
if(cleanContent.length > 10){
|
||||
Share.share({
|
||||
message: cleanContent
|
||||
});
|
||||
}
|
||||
}}>
|
||||
<Text style={{ fontSize: 16, padding: 3, paddingLeft: 40 }}>{
|
||||
cleanContent
|
||||
}</Text>
|
||||
</Pressable>
|
||||
<Media content={post.content} postId={post._id} post={post} style={{ paddingTop: 2 }} />
|
||||
</View> :
|
||||
<View>
|
||||
|
||||
Reference in New Issue
Block a user