diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-10-03 16:02:03 -0500 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-10-03 16:02:03 -0500 |
commit | 195d2f7d2bd193108938901c3f757a9e89080b63 (patch) | |
tree | 1a2084951cd29362bf4c91109551a5869b863f66 /src/view/com/posts/FeedItem.tsx | |
parent | 2058505bf12c0ddf145bd00182da96d0cf5e8f53 (diff) | |
download | voidsky-195d2f7d2bd193108938901c3f757a9e89080b63.tar.zst |
Implement mentions rendering
Diffstat (limited to 'src/view/com/posts/FeedItem.tsx')
-rw-r--r-- | src/view/com/posts/FeedItem.tsx | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/view/com/posts/FeedItem.tsx b/src/view/com/posts/FeedItem.tsx index 53abc4309..c24762730 100644 --- a/src/view/com/posts/FeedItem.tsx +++ b/src/view/com/posts/FeedItem.tsx @@ -9,6 +9,7 @@ import {ComposePostModel, SharePostModel} from '../../../state/models/shell' import {Link} from '../util/Link' import {PostDropdownBtn} from '../util/DropdownBtn' import {UserInfoText} from '../util/UserInfoText' +import {RichText} from '../util/RichText' import {s, colors} from '../../lib/styles' import {ago} from '../../lib/strings' import {DEF_AVATER} from '../../lib/assets' @@ -114,9 +115,13 @@ export const FeedItem = observer(function FeedItem({ </Link> </View> )} - <Text style={[styles.postText, s.f15, s['lh15-1.3']]}> - {record.text} - </Text> + <View style={styles.postTextContainer}> + <RichText + text={record.text} + entities={record.entities} + style={[s.f15, s['lh15-1.3']]} + /> + </View> <View style={styles.ctrls}> <TouchableOpacity style={styles.ctrl} onPress={onPressReply}> <FontAwesomeIcon @@ -209,8 +214,13 @@ const styles = StyleSheet.create({ metaItem: { paddingRight: 5, }, - postText: { + postTextContainer: { + flexDirection: 'row', + alignItems: 'center', + flexWrap: 'wrap', paddingBottom: 8, + }, + postText: { fontFamily: 'Helvetica Neue', }, ctrls: { |