From 8cb076f5fd8d4435703ac1ac4705c275eb38c0e8 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Tue, 8 Aug 2023 11:29:38 -0500 Subject: fix thread spacing and reply lines --- src/view/com/post-thread/PostThreadItem.tsx | 393 +++++++++++++++------------- 1 file changed, 217 insertions(+), 176 deletions(-) (limited to 'src/view/com/post-thread/PostThreadItem.tsx') diff --git a/src/view/com/post-thread/PostThreadItem.tsx b/src/view/com/post-thread/PostThreadItem.tsx index 41be392a7..cbdd90b86 100644 --- a/src/view/com/post-thread/PostThreadItem.tsx +++ b/src/view/com/post-thread/PostThreadItem.tsx @@ -159,171 +159,189 @@ export const PostThreadItem = observer(function PostThreadItem({ if (item._isHighlightedPost) { return ( - - - - - + <> + {item.rootUri !== item.uri && ( + + + + - - - + )} + + + + + + + + + + + + + {sanitizeDisplayName( + item.post.author.displayName || + sanitizeHandle(item.post.author.handle), + )} + + + + ·  + + {({timeElapsed}) => <>{timeElapsed}} + + + + + + + - - {sanitizeDisplayName( - item.post.author.displayName || - sanitizeHandle(item.post.author.handle), - )} + + {sanitizeHandle(item.post.author.handle, '@')} - - ·  - - {({timeElapsed}) => <>{timeElapsed}} - - - - + + + + + {item.richText?.text ? ( + + + + ) : undefined} + {item.post.embed && ( + + + + )} + + + {hasEngagement ? ( + + {item.post.repostCount ? ( + + + + {formatCount(item.post.repostCount)} + {' '} + {pluralize(item.post.repostCount, 'repost')} + + + ) : ( + <> + )} + {item.post.likeCount ? ( + + + + {formatCount(item.post.likeCount)} + {' '} + {pluralize(item.post.likeCount, 'like')} + + + ) : ( + <> + )} + + ) : ( + <> + )} + + - - - - {sanitizeHandle(item.post.author.handle, '@')} - - - - - - - - - {item.richText?.text ? ( - - - - ) : undefined} - {item.post.embed && ( - - - - )} - - - {hasEngagement ? ( - - {item.post.repostCount ? ( - - - - {formatCount(item.post.repostCount)} - {' '} - {pluralize(item.post.repostCount, 'repost')} - - - ) : ( - <> - )} - {item.post.likeCount ? ( - - - - {formatCount(item.post.likeCount)} - {' '} - {pluralize(item.post.likeCount, 'like')} - - - ) : ( - <> - )} - - ) : ( - <> - )} - - - - + + ) } else { return ( @@ -336,26 +354,36 @@ export const PostThreadItem = observer(function PostThreadItem({ pal.border, pal.view, item._showParentReplyLine && styles.noTopBorder, + !item._showChildReplyLine && {borderBottomWidth: 1}, ]} moderation={item.moderation.content}> - {item._showParentReplyLine && ( - - )} - {item._showChildReplyLine && ( - - )} - + + + + {item._showParentReplyLine && ( + + )} + + + + + + {item._showChildReplyLine && ( + + )} +