From f333a90fab79d582bbb7f9114f0b005fdb1cae8b Mon Sep 17 00:00:00 2001
From: Paul Frazee <pfrazee@gmail.com>
Date: Fri, 4 Nov 2022 17:39:54 -0500
Subject: Update to the latest APIs

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

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

diff --git a/src/view/com/post-thread/PostThreadItem.tsx b/src/view/com/post-thread/PostThreadItem.tsx
index 90cffc029..9fb145f15 100644
--- a/src/view/com/post-thread/PostThreadItem.tsx
+++ b/src/view/com/post-thread/PostThreadItem.tsx
@@ -3,7 +3,7 @@ import {observer} from 'mobx-react-lite'
 import {Image, StyleSheet, Text, TouchableOpacity, View} from 'react-native'
 import Svg, {Line} from 'react-native-svg'
 import {AtUri} from '../../../third-party/uri'
-import * as PostType from '../../../third-party/api/src/types/app/bsky/post'
+import * as PostType from '../../../third-party/api/src/client/types/app/bsky/feed/post'
 import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
 import {PostThreadViewPostModel} from '../../../state/models/post-thread-view'
 import {Link} from '../util/Link'
@@ -31,20 +31,20 @@ export const PostThreadItem = observer(function PostThreadItem({
 
   const itemHref = useMemo(() => {
     const urip = new AtUri(item.uri)
-    return `/profile/${item.author.name}/post/${urip.rkey}`
-  }, [item.uri, item.author.name])
-  const itemTitle = `Post by ${item.author.name}`
-  const authorHref = `/profile/${item.author.name}`
-  const authorTitle = item.author.name
+    return `/profile/${item.author.handle}/post/${urip.rkey}`
+  }, [item.uri, item.author.handle])
+  const itemTitle = `Post by ${item.author.handle}`
+  const authorHref = `/profile/${item.author.handle}`
+  const authorTitle = item.author.handle
   const likesHref = useMemo(() => {
     const urip = new AtUri(item.uri)
-    return `/profile/${item.author.name}/post/${urip.rkey}/liked-by`
-  }, [item.uri, item.author.name])
+    return `/profile/${item.author.handle}/post/${urip.rkey}/liked-by`
+  }, [item.uri, item.author.handle])
   const likesTitle = 'Likes on this post'
   const repostsHref = useMemo(() => {
     const urip = new AtUri(item.uri)
-    return `/profile/${item.author.name}/post/${urip.rkey}/reposted-by`
-  }, [item.uri, item.author.name])
+    return `/profile/${item.author.handle}/post/${urip.rkey}/reposted-by`
+  }, [item.uri, item.author.handle])
   const repostsTitle = 'Reposts of this post'
 
   const onPressReply = () => {
@@ -116,7 +116,7 @@ export const PostThreadItem = observer(function PostThreadItem({
             <UserAvatar
               size={50}
               displayName={item.author.displayName}
-              name={item.author.name}
+              handle={item.author.handle}
             />
           </Link>
           <View style={styles.layoutContent}>
@@ -147,7 +147,7 @@ export const PostThreadItem = observer(function PostThreadItem({
                 style={styles.metaItem}
                 href={authorHref}
                 title={authorTitle}>
-                <Text style={[s.f14, s.gray5]}>@{item.author.name}</Text>
+                <Text style={[s.f14, s.gray5]}>@{item.author.handle}</Text>
               </Link>
             </View>
           </View>
@@ -235,12 +235,12 @@ export const PostThreadItem = observer(function PostThreadItem({
             <UserAvatar
               size={50}
               displayName={item.author.displayName}
-              name={item.author.name}
+              handle={item.author.handle}
             />
           </Link>
           <View style={styles.layoutContent}>
             {item.replyingToAuthor &&
-              item.replyingToAuthor !== item.author.name && (
+              item.replyingToAuthor !== item.author.handle && (
                 <View style={[s.flexRow, {alignItems: 'center'}]}>
                   <FontAwesomeIcon
                     icon="reply"
@@ -267,7 +267,7 @@ export const PostThreadItem = observer(function PostThreadItem({
                 style={styles.metaItem}
                 href={authorHref}
                 title={authorTitle}>
-                <Text style={[s.f14, s.gray5]}>@{item.author.name}</Text>
+                <Text style={[s.f14, s.gray5]}>@{item.author.handle}</Text>
               </Link>
               <Text style={[styles.metaItem, s.f14, s.gray5]}>
                 &middot; {ago(item.indexedAt)}
-- 
cgit 1.4.1

