diff --git a/src/view/com/post/Post.tsx b/src/view/com/post/Post.tsx index 51a1381ec8..28310dc4e0 100644 --- a/src/view/com/post/Post.tsx +++ b/src/view/com/post/Post.tsx @@ -15,6 +15,7 @@ import {useQueryClient} from '@tanstack/react-query' import {moderatePost_wrapped as moderatePost} from '#/lib/moderatePost_wrapped' import {POST_TOMBSTONE, Shadow, usePostShadow} from '#/state/cache/post-shadow' import {useModerationOpts} from '#/state/preferences/moderation-opts' +import {useSession} from '#/state/session' import {useComposerControls} from '#/state/shell/composer' import {MAX_POST_LINES} from 'lib/constants' import {usePalette} from 'lib/hooks/usePalette' @@ -145,6 +146,9 @@ function PostInner({ precacheProfile(queryClient, post.author) }, [queryClient, post.author]) + const {currentAccount} = useSession() + const isOwner = replyAuthorDid === currentAccount?.did + return ( - - Reply to{' '} - - - - + {isOwner ? ( + Reply to you + ) : ( + + Reply to{' '} + + + + + )} )} diff --git a/src/view/com/posts/FeedItem.tsx b/src/view/com/posts/FeedItem.tsx index 675f23a88c..70e66e4864 100644 --- a/src/view/com/posts/FeedItem.tsx +++ b/src/view/com/posts/FeedItem.tsx @@ -43,6 +43,7 @@ import {Text} from '../util/text/Text' import {PreviewableUserAvatar} from '../util/UserAvatar' import {AviFollowButton} from './AviFollowButton' import hairlineWidth = StyleSheet.hairlineWidth +import {useSession} from '#/state/session' import {Repost_Stroke2_Corner2_Rounded as Repost} from '#/components/icons/Repost' interface FeedItemProps { @@ -196,6 +197,11 @@ let FeedItemInner = ({ }, ] + const {currentAccount} = useSession() + const isOwner = + AppBskyFeedDefs.isReasonRepost(reason) && + reason.by.did === currentAccount?.did + return ( - - Reposted by{' '} - - - - + {isOwner ? ( + Reposted by you + ) : ( + + Reposted by{' '} + + + + + )} ) : null} @@ -411,6 +425,8 @@ PostContent = memo(PostContent) function ReplyToLabel({profile}: {profile: AppBskyActorDefs.ProfileViewBasic}) { const pal = usePalette('default') + const {currentAccount} = useSession() + const isOwner = profile.did === currentAccount?.did return ( @@ -424,23 +440,27 @@ function ReplyToLabel({profile}: {profile: AppBskyActorDefs.ProfileViewBasic}) { style={[pal.textLight, s.mr2]} lineHeight={1.2} numberOfLines={1}> - - Reply to{' '} - - - - + {isOwner ? ( + Reply to you + ) : ( + + Reply to{' '} + + + + + )} )