diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-09-20 19:13:54 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-20 19:13:54 -0700 |
commit | 498c3e2c271524f7bac08df9d6cc4d72174a4521 (patch) | |
tree | a9729955bc3313a2e80acd78002f03e3cc412426 /src/view/com/post-thread/PostThread.tsx | |
parent | acc98ac1ab07f60dcb118f0912a50d41cd5e76aa (diff) | |
download | voidsky-498c3e2c271524f7bac08df9d6cc4d72174a4521.tar.zst |
Tune the treeview UI a bit more (#1494)
Diffstat (limited to 'src/view/com/post-thread/PostThread.tsx')
-rw-r--r-- | src/view/com/post-thread/PostThread.tsx | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/src/view/com/post-thread/PostThread.tsx b/src/view/com/post-thread/PostThread.tsx index 373b4499d..3c5d3a88d 100644 --- a/src/view/com/post-thread/PostThread.tsx +++ b/src/view/com/post-thread/PostThread.tsx @@ -103,12 +103,6 @@ export const PostThread = observer(function PostThread({ return [] }, [view.isLoadingFromCache, view.thread, maxVisible]) const highlightedPostIndex = posts.findIndex(post => post._isHighlightedPost) - const showBottomBorder = - !treeView || - // in the treeview, only show the bottom border - // if there are replies under the highlighted posts - posts.findLast(v => v instanceof PostThreadItemModel) !== - posts[highlightedPostIndex] useSetTitle( view.thread?.postRecord && `${sanitizeDisplayName( @@ -194,10 +188,7 @@ export const PostThread = observer(function PostThread({ ) } else if (item === REPLY_PROMPT) { return ( - <View - style={ - treeView && [pal.border, {borderBottomWidth: 1, marginBottom: 6}] - }> + <View> {isDesktopWeb && <ComposePrompt onPressCompose={onPressReply} />} </View> ) @@ -242,14 +233,11 @@ export const PostThread = observer(function PostThread({ // -prf return ( <View - style={[ - {height: 400}, - showBottomBorder && { - borderTopWidth: 1, - borderColor: pal.colors.border, - }, - treeView && {marginTop: 10}, - ]} + style={{ + height: 400, + borderTopWidth: 1, + borderColor: pal.colors.border, + }} /> ) } else if (item === CHILD_SPINNER) { @@ -273,7 +261,7 @@ export const PostThread = observer(function PostThread({ } return <></> }, - [onRefresh, onPressReply, pal, posts, isTablet, treeView, showBottomBorder], + [onRefresh, onPressReply, pal, posts, isTablet, treeView], ) // loading |