diff options
author | Ollie H <renahlee@outlook.com> | 2023-05-09 10:00:54 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-09 12:00:54 -0500 |
commit | cfdfd8f39514a3d8edea373ad7d170c71ec2652b (patch) | |
tree | 6fa7fe47a6b9a15d7145f8d658ebfa5bbfbdcbe4 /src | |
parent | d0990e9b499f35d7bc89eac1932f4e26b42873b6 (diff) | |
download | voidsky-cfdfd8f39514a3d8edea373ad7d170c71ec2652b.tar.zst |
Add text wrapping to profile header (#603)
Diffstat (limited to 'src')
-rw-r--r-- | src/view/com/profile/ProfileHeader.tsx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/view/com/profile/ProfileHeader.tsx b/src/view/com/profile/ProfileHeader.tsx index d69cf4a12..dee788aff 100644 --- a/src/view/com/profile/ProfileHeader.tsx +++ b/src/view/com/profile/ProfileHeader.tsx @@ -30,7 +30,7 @@ import {ProfileHeaderWarnings} from '../util/moderation/ProfileHeaderWarnings' import {usePalette} from 'lib/hooks/usePalette' import {useAnalytics} from 'lib/analytics' import {NavigationProp} from 'lib/routes/types' -import {isDesktopWeb} from 'platform/detection' +import {isDesktopWeb, isNative} from 'platform/detection' import {FollowState} from 'state/models/cache/my-follows' import {shareUrl} from 'lib/sharing' import {formatCount} from '../util/numeric/format' @@ -367,7 +367,7 @@ const ProfileHeaderLoaded = observer( </Text> </View> ) : undefined} - <Text style={pal.textLight}>@{view.handle}</Text> + <Text style={[pal.textLight, styles.handle]}>@{view.handle}</Text> </View> {!blockHide && ( <> @@ -553,6 +553,15 @@ const styles = StyleSheet.create({ }, title: {lineHeight: 38}, + // Word wrapping appears fine on + // mobile but overflows on desktop + handle: isNative + ? undefined + : { + // eslint-disable-next-line + wordBreak: 'break-all', + }, + handleLine: { flexDirection: 'row', marginBottom: 8, |