diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-05-25 17:26:34 -0500 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2023-05-25 17:26:34 -0500 |
commit | dd1bbcfb0b22fda76018fda653cdfc95e5f05c69 (patch) | |
tree | 59bee9e082f1b73a50ad6f43ff00739862cbf486 /src/view/shell/Drawer.tsx | |
parent | 8fa33ac928163459a9f8a414a388b2f19d0e8795 (diff) | |
download | voidsky-dd1bbcfb0b22fda76018fda653cdfc95e5f05c69.tar.zst |
Add scrollview to drawer
Diffstat (limited to 'src/view/shell/Drawer.tsx')
-rw-r--r-- | src/view/shell/Drawer.tsx | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/view/shell/Drawer.tsx b/src/view/shell/Drawer.tsx index d00d05f75..5617cd5b8 100644 --- a/src/view/shell/Drawer.tsx +++ b/src/view/shell/Drawer.tsx @@ -2,6 +2,7 @@ import React, {ComponentProps} from 'react' import { Linking, SafeAreaView, + ScrollView, StyleProp, StyleSheet, TouchableOpacity, @@ -41,7 +42,7 @@ import {getTabState, TabState} from 'lib/routes/helpers' import {NavigationProp} from 'lib/routes/types' import {useNavigationTabState} from 'lib/hooks/useNavigationTabState' import {isWeb} from 'platform/detection' -import {formatCount} from 'view/com/util/numeric/format' +import {formatCount, formatCountShortOnly} from 'view/com/util/numeric/format' export const DrawerContent = observer(() => { const theme = useTheme() @@ -154,19 +155,18 @@ export const DrawerContent = observer(() => { type="xl" style={[pal.textLight, styles.profileCardFollowers]}> <Text type="xl-medium" style={pal.text}> - {formatCount(store.me.followersCount ?? 0)} + {formatCountShortOnly(store.me.followersCount ?? 0)} </Text>{' '} {pluralize(store.me.followersCount || 0, 'follower')} ·{' '} <Text type="xl-medium" style={pal.text}> - {formatCount(store.me.followsCount ?? 0)} + {formatCountShortOnly(store.me.followsCount ?? 0)} </Text>{' '} following </Text> </TouchableOpacity> </View> <InviteCodes /> - <View style={s.flex1} /> - <View style={styles.main}> + <ScrollView style={styles.main}> <MenuItem icon={ isAtSearch ? ( @@ -292,8 +292,8 @@ export const DrawerContent = observer(() => { accessibilityHint="" onPress={onPressSettings} /> - </View> - <View style={s.flex1} /> + <View style={styles.smallSpacer} /> + </ScrollView> <View style={styles.footer}> {!isWeb && ( <TouchableOpacity @@ -449,6 +449,10 @@ const styles = StyleSheet.create({ }, main: { paddingLeft: 20, + paddingTop: 20, + }, + smallSpacer: { + height: 20, }, profileCardDisplayName: { |