From 2b37b6549b6cb17db582a81a2bdca8316b1e4861 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Wed, 23 Nov 2022 14:22:40 -0600 Subject: Add replying-to context to threads --- src/view/com/post-thread/PostThreadItem.tsx | 57 ++++++++++++++++++++++------- 1 file changed, 43 insertions(+), 14 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 bb90afe19..98d6bd371 100644 --- a/src/view/com/post-thread/PostThreadItem.tsx +++ b/src/view/com/post-thread/PostThreadItem.tsx @@ -17,6 +17,7 @@ import {PostMeta} from '../util/PostMeta' import {PostCtrls} from '../util/PostCtrls' const PARENT_REPLY_LINE_LENGTH = 8 +const REPLYING_TO_LINE_LENGTH = 6 export const PostThreadItem = observer(function PostThreadItem({ item, @@ -204,8 +205,25 @@ export const PostThreadItem = observer(function PostThreadItem({ } else { return ( - {!!item.replyingToAuthor && } + {!item.replyingTo && item.record.reply && ( + + )} {item.replies?.length !== 0 && } + {item.replyingTo ? ( + + + + + + + {item.replyingTo.text} + + + ) : undefined} @@ -227,19 +245,6 @@ export const PostThreadItem = observer(function PostThreadItem({ isAuthor={item.author.did === store.me.did} onDeletePost={onDeletePost} /> - {item.replyingToAuthor && - item.replyingToAuthor !== item.author.handle && ( - - Replying to - - - @{item.replyingToAuthor} - - - - )}