diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-12-20 10:33:56 -0600 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-12-20 10:33:56 -0600 |
commit | 74d76fbc6ab9245a6966eae7f5e75b235edea7d3 (patch) | |
tree | 7edf4d2746cf2721236574d391bd039ed2a50c5a /src | |
parent | 99a28c0aae8349007f0ca1a01cb95343da08b2e8 (diff) | |
download | voidsky-74d76fbc6ab9245a6966eae7f5e75b235edea7d3.tar.zst |
Use consistent rendering of avis and post metas in threads
Diffstat (limited to 'src')
-rw-r--r-- | src/view/com/posts/FeedItem.tsx | 55 |
1 files changed, 15 insertions, 40 deletions
diff --git a/src/view/com/posts/FeedItem.tsx b/src/view/com/posts/FeedItem.tsx index 48be582dc..f653a4db7 100644 --- a/src/view/com/posts/FeedItem.tsx +++ b/src/view/com/posts/FeedItem.tsx @@ -114,22 +114,8 @@ export const FeedItem = observer(function FeedItem({ /> ) : undefined} <Link style={outerStyles} href={itemHref} title={itemTitle} noFeedback> - {isChild && ( - <View - style={[ - styles.topReplyLine, - item._isThreadChild ? styles.topReplyLineSmallAvi : undefined, - ]} - /> - )} - {item._isThreadParent && ( - <View - style={[ - styles.bottomReplyLine, - item._isThreadChild ? styles.bottomReplyLineSmallAvi : undefined, - ]} - /> - )} + {isChild && <View style={[styles.topReplyLine]} />} + {item._isThreadParent && <View style={[styles.bottomReplyLine]} />} {item.repostedBy && ( <Link style={styles.includeReason} @@ -159,12 +145,9 @@ export const FeedItem = observer(function FeedItem({ )} <View style={styles.layout}> <View style={styles.layoutAvi}> - <Link - href={authorHref} - title={item.author.handle} - style={item._isThreadChild ? {marginLeft: 10} : undefined}> + <Link href={authorHref} title={item.author.handle}> <UserAvatar - size={item._isThreadChild ? 30 : 52} + size={52} displayName={item.author.displayName} handle={item.author.handle} avatar={item.author.avatar} @@ -172,19 +155,17 @@ export const FeedItem = observer(function FeedItem({ </Link> </View> <View style={styles.layoutContent}> - {!item._isThreadChild ? ( - <PostMeta - itemHref={itemHref} - itemTitle={itemTitle} - authorHref={authorHref} - authorHandle={item.author.handle} - authorDisplayName={item.author.displayName} - timestamp={item.indexedAt} - isAuthor={item.author.did === store.me.did} - onCopyPostText={onCopyPostText} - onDeletePost={onDeletePost} - /> - ) : undefined} + <PostMeta + itemHref={itemHref} + itemTitle={itemTitle} + authorHref={authorHref} + authorHandle={item.author.handle} + authorDisplayName={item.author.displayName} + timestamp={item.indexedAt} + isAuthor={item.author.did === store.me.did} + onCopyPostText={onCopyPostText} + onDeletePost={onDeletePost} + /> {!isChild && replyHref !== '' && ( <View style={[s.flexRow, s.mb2, {alignItems: 'center'}]}> <FontAwesomeIcon @@ -289,9 +270,6 @@ const styles = StyleSheet.create({ borderLeftWidth: 2, borderLeftColor: colors.gray2, }, - topReplyLineSmallAvi: { - height: TOP_REPLY_LINE_LENGTH + 10, - }, bottomReplyLine: { position: 'absolute', left: 34, @@ -300,9 +278,6 @@ const styles = StyleSheet.create({ borderLeftWidth: 2, borderLeftColor: colors.gray2, }, - bottomReplyLineSmallAvi: { - top: 50, - }, includeReason: { flexDirection: 'row', paddingLeft: 60, |