From 74d76fbc6ab9245a6966eae7f5e75b235edea7d3 Mon Sep 17 00:00:00 2001
From: Paul Frazee <pfrazee@gmail.com>
Date: Tue, 20 Dec 2022 10:33:56 -0600
Subject: Use consistent rendering of avis and post metas in threads

---
 src/view/com/posts/FeedItem.tsx | 55 +++++++++++------------------------------
 1 file changed, 15 insertions(+), 40 deletions(-)

(limited to 'src/view/com/posts/FeedItem.tsx')

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,
-- 
cgit 1.4.1

