From ae3099dfca13f6651762f6ea9a3d2a14ebc99df4 Mon Sep 17 00:00:00 2001
From: Paul Frazee <pfrazee@gmail.com>
Date: Sun, 18 Dec 2022 18:54:05 -0600
Subject: Improve thread rendering

---
 src/view/com/posts/FeedItem.tsx | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

(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 74edad365..51f76904f 100644
--- a/src/view/com/posts/FeedItem.tsx
+++ b/src/view/com/posts/FeedItem.tsx
@@ -2,6 +2,7 @@ import React, {useMemo, useState} from 'react'
 import {observer} from 'mobx-react-lite'
 import {StyleSheet, Text, View} from 'react-native'
 import Clipboard from '@react-native-clipboard/clipboard'
+import Svg, {Circle} from 'react-native-svg'
 import {AtUri} from '../../../third-party/uri'
 import * as PostType from '../../../third-party/api/src/client/types/app/bsky/feed/post'
 import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
@@ -207,6 +208,22 @@ export const FeedItem = observer(function FeedItem({
           </View>
         </View>
       </Link>
+      {item._isThreadChildElided ? (
+        <Link
+          style={styles.viewFullThread}
+          href={itemHref}
+          title={itemTitle}
+          noFeedback>
+          <View style={styles.viewFullThreadDots}>
+            <Svg width="4" height="30">
+              <Circle x="2" y="5" r="1.5" fill={colors.gray3} />
+              <Circle x="2" y="11" r="1.5" fill={colors.gray3} />
+              <Circle x="2" y="17" r="1.5" fill={colors.gray3} />
+            </Svg>
+          </View>
+          <Text style={styles.viewFullThreadText}>View full thread</Text>
+        </Link>
+      ) : undefined}
     </>
   )
 })
@@ -281,4 +298,18 @@ const styles = StyleSheet.create({
   postEmbeds: {
     marginBottom: 10,
   },
+  viewFullThread: {
+    backgroundColor: colors.white,
+    paddingTop: 4,
+    paddingLeft: 72,
+  },
+  viewFullThreadDots: {
+    position: 'absolute',
+    left: 35,
+    top: 0,
+  },
+  viewFullThreadText: {
+    color: colors.blue3,
+    fontSize: 16,
+  },
 })
-- 
cgit 1.4.1

