about summary refs log tree commit diff
path: root/src/view/com/util
diff options
context:
space:
mode:
authorJoel <joel.garplind@gmail.com>2024-07-08 00:27:30 +0200
committerGitHub <noreply@github.com>2024-07-07 15:27:30 -0700
commitea7afecf28e34b4d1006dc2340630a9f3ea6a9f7 (patch)
treef6b1e635ffec1d7f3a70fe9341436cd480d703d2 /src/view/com/util
parentea37298cdd3dec881a6283eee166b4b508ba12bc (diff)
downloadvoidsky-ea7afecf28e34b4d1006dc2340630a9f3ea6a9f7.tar.zst
Fix misplaced '@' in RTL post meta. (#4531)
Co-authored-by: Joel <joel.garplind+github@gmail.com>
Co-authored-by: Hailey <me@haileyok.com>
Diffstat (limited to 'src/view/com/util')
-rw-r--r--src/view/com/util/PostMeta.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/view/com/util/PostMeta.tsx b/src/view/com/util/PostMeta.tsx
index 3f855c336..aec787e4e 100644
--- a/src/view/com/util/PostMeta.tsx
+++ b/src/view/com/util/PostMeta.tsx
@@ -32,6 +32,8 @@ interface PostMetaOpts {
   style?: StyleProp<ViewStyle>
 }
 
+const NON_BREAKING_SPACE = '\u00A0'
+
 let PostMeta = (opts: PostMetaOpts): React.ReactNode => {
   const pal = usePalette('default')
   const displayName = opts.author.displayName || opts.author.handle
@@ -83,7 +85,7 @@ let PostMeta = (opts: PostMetaOpts): React.ReactNode => {
             type="md"
             disableMismatchWarning
             style={[pal.textLight, {flexShrink: 4}]}
-            text={'\xa0' + sanitizeHandle(handle, '@')}
+            text={NON_BREAKING_SPACE + sanitizeHandle(handle, '@')}
             href={profileLink}
             onBeforePress={onBeforePressAuthor}
             anchorNoUnderline