about summary refs log tree commit diff
path: root/src/view/com/posts/FeedItem.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/view/com/posts/FeedItem.tsx')
-rw-r--r--src/view/com/posts/FeedItem.tsx67
1 files changed, 43 insertions, 24 deletions
diff --git a/src/view/com/posts/FeedItem.tsx b/src/view/com/posts/FeedItem.tsx
index cc767a4a3..a59eeea52 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 {
@@ -200,6 +201,11 @@ let FeedItemInner = ({
     },
   ]
 
+  const {currentAccount} = useSession()
+  const isOwner =
+    AppBskyFeedDefs.isReasonRepost(reason) &&
+    reason.by.did === currentAccount?.did
+
   return (
     <Link
       testID={`feedItem-by-${post.author.handle}`}
@@ -250,11 +256,15 @@ let FeedItemInner = ({
             <Link
               style={styles.includeReason}
               href={makeProfileLink(reason.by)}
-              title={_(
-                msg`Reposted by ${sanitizeDisplayName(
-                  reason.by.displayName || reason.by.handle,
-                )}`,
-              )}
+              title={
+                isOwner
+                  ? _(msg`Reposted by you`)
+                  : _(
+                      msg`Reposted by ${sanitizeDisplayName(
+                        reason.by.displayName || reason.by.handle,
+                      )}`,
+                    )
+              }
               onBeforePress={onOpenReposter}>
               <Repost
                 style={{color: pal.colors.textLight, marginRight: 3}}
@@ -266,24 +276,28 @@ let FeedItemInner = ({
                 style={pal.textLight}
                 lineHeight={1.2}
                 numberOfLines={1}>
-                <Trans>
-                  Reposted by{' '}
-                  <ProfileHoverCard inline did={reason.by.did}>
-                    <TextLinkOnWebOnly
-                      type="sm-bold"
-                      style={pal.textLight}
-                      lineHeight={1.2}
-                      numberOfLines={1}
-                      text={sanitizeDisplayName(
-                        reason.by.displayName ||
-                          sanitizeHandle(reason.by.handle),
-                        moderation.ui('displayName'),
-                      )}
-                      href={makeProfileLink(reason.by)}
-                      onBeforePress={onOpenReposter}
-                    />
-                  </ProfileHoverCard>
-                </Trans>
+                {isOwner ? (
+                  <Trans>Reposted by you</Trans>
+                ) : (
+                  <Trans>
+                    Reposted by{' '}
+                    <ProfileHoverCard inline did={reason.by.did}>
+                      <TextLinkOnWebOnly
+                        type="sm-bold"
+                        style={pal.textLight}
+                        lineHeight={1.2}
+                        numberOfLines={1}
+                        text={sanitizeDisplayName(
+                          reason.by.displayName ||
+                            sanitizeHandle(reason.by.handle),
+                          moderation.ui('displayName'),
+                        )}
+                        href={makeProfileLink(reason.by)}
+                        onBeforePress={onOpenReposter}
+                      />
+                    </ProfileHoverCard>
+                  </Trans>
+                )}
               </Text>
             </Link>
           ) : null}
@@ -421,6 +435,9 @@ function ReplyToLabel({
   blocked?: boolean
 }) {
   const pal = usePalette('default')
+  const {currentAccount} = useSession()
+  const isMe = profile.did === currentAccount?.did
+
   return (
     <View style={[s.flexRow, s.mb2, s.alignCenter]}>
       <FontAwesomeIcon
@@ -433,7 +450,9 @@ function ReplyToLabel({
         style={[pal.textLight, s.mr2]}
         lineHeight={1.2}
         numberOfLines={1}>
-        {blocked ? (
+        {isMe ? (
+          <Trans context="description">Reply to you</Trans>
+        ) : blocked ? (
           <Trans context="description">Reply to a blocked post</Trans>
         ) : (
           <Trans context="description">