mirror of
https://github.com/tooot-app/app
synced 2025-02-05 04:47:37 +01:00
Fix followed by text overflow
https://github.com/tooot-app/app/issues/272
This commit is contained in:
parent
6b4c2d18ec
commit
c94ef1882b
10
.github/workflows/codeql-analysis.yml
vendored
10
.github/workflows/codeql-analysis.yml
vendored
@ -14,11 +14,11 @@ name: "CodeQL"
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
pull_request:
|
# pull_request:
|
||||||
# The branches below must be a subset of the branches above
|
# # The branches below must be a subset of the branches above
|
||||||
branches: [ main ]
|
# branches: [ main ]
|
||||||
schedule:
|
# schedule:
|
||||||
- cron: '35 4 * * 4'
|
# - cron: '35 4 * * 4'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
analyze:
|
analyze:
|
||||||
|
@ -7,7 +7,7 @@ import {
|
|||||||
} from '@utils/slices/instancesSlice'
|
} from '@utils/slices/instancesSlice'
|
||||||
import { StyleConstants } from '@utils/styles/constants'
|
import { StyleConstants } from '@utils/styles/constants'
|
||||||
import { useTheme } from '@utils/styles/ThemeManager'
|
import { useTheme } from '@utils/styles/ThemeManager'
|
||||||
import React, { useMemo } from 'react'
|
import React from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { View } from 'react-native'
|
import { View } from 'react-native'
|
||||||
import { useSelector } from 'react-redux'
|
import { useSelector } from 'react-redux'
|
||||||
@ -35,23 +35,6 @@ const AccountInformationAccount: React.FC<Props> = ({
|
|||||||
options: { enabled: account !== undefined }
|
options: { enabled: account !== undefined }
|
||||||
})
|
})
|
||||||
|
|
||||||
const movedContent = useMemo(() => {
|
|
||||||
if (account?.moved) {
|
|
||||||
return (
|
|
||||||
<CustomText
|
|
||||||
fontStyle='M'
|
|
||||||
style={{
|
|
||||||
marginLeft: StyleConstants.Spacing.S,
|
|
||||||
color: colors.secondary
|
|
||||||
}}
|
|
||||||
selectable
|
|
||||||
>
|
|
||||||
@{account.moved.acct}
|
|
||||||
</CustomText>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}, [account?.moved])
|
|
||||||
|
|
||||||
if (account || (localInstance && instanceAccount)) {
|
if (account || (localInstance && instanceAccount)) {
|
||||||
return (
|
return (
|
||||||
<View
|
<View
|
||||||
@ -62,23 +45,24 @@ const AccountInformationAccount: React.FC<Props> = ({
|
|||||||
marginBottom: StyleConstants.Spacing.L
|
marginBottom: StyleConstants.Spacing.L
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
<CustomText fontStyle='M' style={{ color: colors.secondary }}>
|
||||||
|
{account?.moved ? (
|
||||||
|
<>
|
||||||
|
{' '}
|
||||||
|
<CustomText selectable>@{account.moved.acct}</CustomText>
|
||||||
|
</>
|
||||||
|
) : null}
|
||||||
<CustomText
|
<CustomText
|
||||||
fontStyle='M'
|
|
||||||
style={{
|
style={{
|
||||||
textDecorationLine: account?.moved ? 'line-through' : undefined,
|
textDecorationLine: account?.moved ? 'line-through' : undefined
|
||||||
color: colors.secondary
|
|
||||||
}}
|
}}
|
||||||
selectable
|
selectable
|
||||||
>
|
>
|
||||||
@{localInstance ? instanceAccount?.acct : account?.acct}
|
@{localInstance ? instanceAccount?.acct : account?.acct}
|
||||||
{localInstance ? `@${instanceUri}` : null}
|
{localInstance ? `@${instanceUri}` : null}
|
||||||
</CustomText>
|
</CustomText>
|
||||||
{relationship?.followed_by ? (
|
{relationship?.followed_by ? t('shared.account.followed_by') : null}
|
||||||
<CustomText fontStyle='M' style={{ color: colors.secondary }}>
|
|
||||||
{t('shared.account.followed_by')}
|
|
||||||
</CustomText>
|
</CustomText>
|
||||||
) : null}
|
|
||||||
{movedContent}
|
|
||||||
{account?.locked ? (
|
{account?.locked ? (
|
||||||
<Icon
|
<Icon
|
||||||
name='Lock'
|
name='Lock'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user