From 13c11801b90b3241eb1244badedf7c510578d6f0 Mon Sep 17 00:00:00 2001
From: Eric Bailey <git@esb.lol>
Date: Tue, 22 Aug 2023 12:49:03 -0500
Subject: fix thread double border (#1251)

---
 src/view/com/post-thread/PostThread.tsx | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

(limited to 'src/view/com/post-thread/PostThread.tsx')

diff --git a/src/view/com/post-thread/PostThread.tsx b/src/view/com/post-thread/PostThread.tsx
index 399e47006..e3dd2cf1d 100644
--- a/src/view/com/post-thread/PostThread.tsx
+++ b/src/view/com/post-thread/PostThread.tsx
@@ -156,7 +156,7 @@ export const PostThread = observer(function PostThread({
   }, [navigation])
 
   const renderItem = React.useCallback(
-    ({item}: {item: YieldedItem}) => {
+    ({item, index}: {item: YieldedItem; index: number}) => {
       if (item === PARENT_SPINNER) {
         return (
           <View style={styles.parentSpinner}>
@@ -205,11 +205,20 @@ export const PostThread = observer(function PostThread({
           </View>
         )
       } else if (item instanceof PostThreadItemModel) {
-        return <PostThreadItem item={item} onPostReply={onRefresh} />
+        const prev = (
+          index - 1 >= 0 ? posts[index - 1] : undefined
+        ) as PostThreadItemModel
+        return (
+          <PostThreadItem
+            item={item}
+            onPostReply={onRefresh}
+            hasPrecedingItem={prev?._showChildReplyLine}
+          />
+        )
       }
       return <></>
     },
-    [onRefresh, onPressReply, pal],
+    [onRefresh, onPressReply, pal, posts],
   )
 
   // loading
-- 
cgit 1.4.1

