about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2025-04-21 17:05:14 -0500
committerGitHub <noreply@github.com>2025-04-21 17:05:14 -0500
commit3f47c8cf0679bf75f58c8647bc03ac8389ac6e31 (patch)
treec0b8c4d3527e5a73a87f6e35bf91828234ac8131 /src
parentaa3ee8db4e883794277dfb71dc27e9e7cb1e8612 (diff)
downloadvoidsky-3f47c8cf0679bf75f58c8647bc03ac8389ac6e31.tar.zst
Improve display name in Settings (#8256)
Diffstat (limited to 'src')
-rw-r--r--src/screens/Settings/Settings.tsx18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/screens/Settings/Settings.tsx b/src/screens/Settings/Settings.tsx
index a723aaa37..dade2bf1f 100644
--- a/src/screens/Settings/Settings.tsx
+++ b/src/screens/Settings/Settings.tsx
@@ -290,6 +290,10 @@ function ProfilePreview({
   if (!moderationOpts) return null
 
   const moderation = moderateProfile(profile, moderationOpts)
+  const displayName = sanitizeDisplayName(
+    profile.displayName || sanitizeHandle(profile.handle),
+    moderation.ui('displayName'),
+  )
 
   return (
     <>
@@ -300,7 +304,14 @@ function ProfilePreview({
         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
           emoji
           testID="profileHeaderDisplayName"
@@ -311,10 +322,7 @@ function ProfilePreview({
             gtMobile ? a.text_4xl : a.text_3xl,
             a.font_heavy,
           ]}>
-          {sanitizeDisplayName(
-            profile.displayName || sanitizeHandle(profile.handle),
-            moderation.ui('displayName'),
-          )}
+          {displayName}
         </Text>
         {shouldShowVerificationCheckButton(verificationState) && (
           <View