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/post/Post.tsx | |
parent | 2058505bf12c0ddf145bd00182da96d0cf5e8f53 (diff) | |
download | voidsky-195d2f7d2bd193108938901c3f757a9e89080b63.tar.zst |
Implement mentions rendering
Diffstat (limited to 'src/view/com/post/Post.tsx')
-rw-r--r-- | src/view/com/post/Post.tsx | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/view/com/post/Post.tsx b/src/view/com/post/Post.tsx index 92113b50b..4cd35659f 100644 --- a/src/view/com/post/Post.tsx +++ b/src/view/com/post/Post.tsx @@ -15,6 +15,7 @@ import {PostThreadViewModel} from '../../../state/models/post-thread-view' import {ComposePostModel} from '../../../state/models/shell' import {Link} from '../util/Link' import {UserInfoText} from '../util/UserInfoText' +import {RichText} from '../util/RichText' import {useStores} from '../../../state' import {s, colors} from '../../lib/styles' import {ago} from '../../lib/strings' @@ -115,9 +116,13 @@ export const Post = observer(function Post({uri}: {uri: string}) { </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 @@ -195,7 +200,10 @@ const styles = StyleSheet.create({ metaItem: { paddingRight: 5, }, - postText: { + postTextContainer: { + flexDirection: 'row', + alignItems: 'center', + flexWrap: 'wrap', paddingBottom: 8, }, ctrls: { |