diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-05-02 23:32:29 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-02 23:32:29 -0500 |
commit | 12a214423293da1914eaae83073e0e3d2c6d1de2 (patch) | |
tree | 4050a318294403fa47edd12ebc63195279d7cd84 /src | |
parent | 883700e09029bd0d9221edb9910d065da5786fe0 (diff) | |
download | voidsky-12a214423293da1914eaae83073e0e3d2c6d1de2.tar.zst |
Remove some confusing horizontal lines in threads (#566)
Diffstat (limited to 'src')
-rw-r--r-- | src/state/models/content/post-thread.ts | 4 | ||||
-rw-r--r-- | src/view/com/post-thread/PostThreadItem.tsx | 10 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/state/models/content/post-thread.ts b/src/state/models/content/post-thread.ts index 18a42732c..a0f75493a 100644 --- a/src/state/models/content/post-thread.ts +++ b/src/state/models/content/post-thread.ts @@ -125,7 +125,7 @@ export class PostThreadItemModel { parentModel._depth = this._depth - 1 parentModel._showChildReplyLine = true if (v.parent.parent) { - parentModel._showParentReplyLine = true //parentModel.uri !== higlightedPostUri + parentModel._showParentReplyLine = true parentModel.assignTreeModels(v.parent, higlightedPostUri, true, false) } this.parent = parentModel @@ -143,7 +143,7 @@ export class PostThreadItemModel { const itemModel = new PostThreadItemModel(this.rootStore, item) itemModel._depth = this._depth + 1 itemModel._showParentReplyLine = - itemModel.parentUri !== higlightedPostUri + itemModel.parentUri !== higlightedPostUri && replies.length === 0 if (item.replies?.length) { itemModel._showChildReplyLine = true itemModel.assignTreeModels(item, higlightedPostUri, false, true) diff --git a/src/view/com/post-thread/PostThreadItem.tsx b/src/view/com/post-thread/PostThreadItem.tsx index 953e67b18..ddb2cb7bb 100644 --- a/src/view/com/post-thread/PostThreadItem.tsx +++ b/src/view/com/post-thread/PostThreadItem.tsx @@ -310,7 +310,12 @@ export const PostThreadItem = observer(function PostThreadItem({ <PostHider testID={`postThreadItem-by-${item.post.author.handle}`} href={itemHref} - style={[styles.outer, {borderColor: pal.colors.border}, pal.view]} + style={[ + styles.outer, + pal.border, + pal.view, + item._showParentReplyLine && styles.noTopBorder, + ]} moderation={item.moderation.thread}> {item._showParentReplyLine && ( <View @@ -425,6 +430,9 @@ const styles = StyleSheet.create({ paddingLeft: 6, paddingRight: 6, }, + noTopBorder: { + borderTopWidth: 0, + }, parentReplyLine: { position: 'absolute', left: 44, |