diff --git a/src/i18n/en/screens/tabs.json b/src/i18n/en/screens/tabs.json index 46a28c89..dbc17037 100644 --- a/src/i18n/en/screens/tabs.json +++ b/src/i18n/en/screens/tabs.json @@ -281,6 +281,7 @@ "accessibilityLabel": "Actions for user {{user}}", "accessibilityHint": "You can mute, block, report or share this user" }, + "followed_by": " is following you", "moved": "User moved", "created_at": "Registered on: {{date}}", "summary": { diff --git a/src/screens/Tabs/Shared/Account/Information/Account.tsx b/src/screens/Tabs/Shared/Account/Information/Account.tsx index 467b1ab0..77a03cb3 100644 --- a/src/screens/Tabs/Shared/Account/Information/Account.tsx +++ b/src/screens/Tabs/Shared/Account/Information/Account.tsx @@ -1,5 +1,6 @@ import Icon from '@components/Icon' import CustomText from '@components/Text' +import { useRelationshipQuery } from '@utils/queryHooks/relationship' import { getInstanceAccount, getInstanceUri @@ -7,6 +8,7 @@ import { import { StyleConstants } from '@utils/styles/constants' import { useTheme } from '@utils/styles/ThemeManager' import React, { useMemo } from 'react' +import { useTranslation } from 'react-i18next' import { View } from 'react-native' import { useSelector } from 'react-redux' import { PlaceholderLine } from 'rn-placeholder' @@ -20,6 +22,7 @@ const AccountInformationAccount: React.FC = ({ account, localInstance }) => { + const { t } = useTranslation('screenTabs') const { colors } = useTheme() const instanceAccount = useSelector( getInstanceAccount, @@ -27,6 +30,11 @@ const AccountInformationAccount: React.FC = ({ ) const instanceUri = useSelector(getInstanceUri) + const { data: relationship } = useRelationshipQuery({ + id: account!.id, + options: { enabled: account !== undefined } + }) + const movedContent = useMemo(() => { if (account?.moved) { return ( @@ -65,6 +73,11 @@ const AccountInformationAccount: React.FC = ({ @{localInstance ? instanceAccount?.acct : account?.acct} {localInstance ? `@${instanceUri}` : null} + {relationship?.followed_by ? ( + + {t('shared.account.followed_by')} + + ) : null} {movedContent} {account?.locked ? (