diff options
Diffstat (limited to 'src/view/com/post-thread')
-rw-r--r-- | src/view/com/post-thread/PostThread.tsx | 6 | ||||
-rw-r--r-- | src/view/com/post-thread/PostThreadItem.tsx | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/view/com/post-thread/PostThread.tsx b/src/view/com/post-thread/PostThread.tsx index 5bd379fed..8a0ddab5d 100644 --- a/src/view/com/post-thread/PostThread.tsx +++ b/src/view/com/post-thread/PostThread.tsx @@ -70,7 +70,11 @@ export const PostThread = observer(function PostThread({uri}: {uri: string}) { // = const posts = view.thread ? Array.from(flattenThread(view.thread)) : [] const renderItem = ({item}: {item: PostThreadViewPostModel}) => ( - <PostThreadItem item={item} onPressShare={onPressShare} /> + <PostThreadItem + item={item} + onPressShare={onPressShare} + onPostReply={onRefresh} + /> ) return ( <FlatList diff --git a/src/view/com/post-thread/PostThreadItem.tsx b/src/view/com/post-thread/PostThreadItem.tsx index d28017e44..ef1324bfb 100644 --- a/src/view/com/post-thread/PostThreadItem.tsx +++ b/src/view/com/post-thread/PostThreadItem.tsx @@ -20,9 +20,11 @@ const PARENT_REPLY_LINE_LENGTH = 8 export const PostThreadItem = observer(function PostThreadItem({ item, onPressShare, + onPostReply, }: { item: PostThreadViewPostModel onPressShare: (_uri: string) => void + onPostReply: () => void }) { const store = useStores() const record = item.record as unknown as PostType.Record @@ -47,7 +49,9 @@ export const PostThreadItem = observer(function PostThreadItem({ const repostsTitle = 'Reposts of this post' const onPressReply = () => { - store.shell.openModal(new ComposePostModel(item.uri)) + store.shell.openModal( + new ComposePostModel({replyTo: item.uri, onPost: onPostReply}), + ) } const onPressToggleRepost = () => { item |