Improve display name in Settings (#8256)
This commit is contained in:
@@ -290,6 +290,10 @@ function ProfilePreview({
|
|||||||
if (!moderationOpts) return null
|
if (!moderationOpts) return null
|
||||||
|
|
||||||
const moderation = moderateProfile(profile, moderationOpts)
|
const moderation = moderateProfile(profile, moderationOpts)
|
||||||
|
const displayName = sanitizeDisplayName(
|
||||||
|
profile.displayName || sanitizeHandle(profile.handle),
|
||||||
|
moderation.ui('displayName'),
|
||||||
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -300,7 +304,14 @@ function ProfilePreview({
|
|||||||
type={shadow.associated?.labeler ? 'labeler' : 'user'}
|
type={shadow.associated?.labeler ? 'labeler' : 'user'}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<View style={[a.flex_row, a.gap_xs, a.align_center]}>
|
<View
|
||||||
|
style={[
|
||||||
|
a.flex_row,
|
||||||
|
a.gap_xs,
|
||||||
|
a.align_center,
|
||||||
|
a.justify_center,
|
||||||
|
a.w_full,
|
||||||
|
]}>
|
||||||
<Text
|
<Text
|
||||||
emoji
|
emoji
|
||||||
testID="profileHeaderDisplayName"
|
testID="profileHeaderDisplayName"
|
||||||
@@ -311,10 +322,7 @@ function ProfilePreview({
|
|||||||
gtMobile ? a.text_4xl : a.text_3xl,
|
gtMobile ? a.text_4xl : a.text_3xl,
|
||||||
a.font_heavy,
|
a.font_heavy,
|
||||||
]}>
|
]}>
|
||||||
{sanitizeDisplayName(
|
{displayName}
|
||||||
profile.displayName || sanitizeHandle(profile.handle),
|
|
||||||
moderation.ui('displayName'),
|
|
||||||
)}
|
|
||||||
</Text>
|
</Text>
|
||||||
{shouldShowVerificationCheckButton(verificationState) && (
|
{shouldShowVerificationCheckButton(verificationState) && (
|
||||||
<View
|
<View
|
||||||
|
|||||||
Reference in New Issue
Block a user