diff options
author | Eric Bailey <git@esb.lol> | 2023-12-04 18:24:51 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-04 16:24:51 -0800 |
commit | 4f171be9bf6c0ffb6c1951e30c95fc0b30aa22b4 (patch) | |
tree | e00e66fbfb0fda89efbe87f3266f11baee01eb22 /src/view/screens/Profile.tsx | |
parent | 6e2eaa746df70bde99e83b6fd3e491a0a93135cd (diff) | |
download | voidsky-4f171be9bf6c0ffb6c1951e30c95fc0b30aa22b4.tar.zst |
Fix bottom space on feeds (#2081)
* Fix bottom space on feeds * Translate * Handle web better
Diffstat (limited to 'src/view/screens/Profile.tsx')
-rw-r--r-- | src/view/screens/Profile.tsx | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/view/screens/Profile.tsx b/src/view/screens/Profile.tsx index 4af1b650e..ea19515b5 100644 --- a/src/view/screens/Profile.tsx +++ b/src/view/screens/Profile.tsx @@ -2,7 +2,7 @@ import React, {useMemo} from 'react' import {StyleSheet, View} from 'react-native' import {useFocusEffect} from '@react-navigation/native' import {AppBskyActorDefs, moderateProfile, ModerationOpts} from '@atproto/api' -import {msg} from '@lingui/macro' +import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {NativeStackScreenProps, CommonNavigatorParams} from 'lib/routes/types' import {CenteredView, FlatList} from '../com/util/Views' @@ -36,6 +36,8 @@ import {useQueryClient} from '@tanstack/react-query' import {useComposerControls} from '#/state/shell/composer' import {listenSoftReset} from '#/state/events' import {truncateAndInvalidate} from '#/state/queries/util' +import {Text} from '#/view/com/util/text/Text' +import {usePalette} from 'lib/hooks/usePalette' interface SectionRef { scrollToTop: () => void @@ -429,6 +431,7 @@ const FeedSection = React.forwardRef<SectionRef, FeedSectionProps>( scrollEventThrottle={1} renderEmptyState={renderPostsEmpty} headerOffset={headerHeight} + renderEndOfFeed={ProfileEndOfFeed} /> {(isScrolledDown || hasNew) && ( <LoadLatestBtn @@ -442,6 +445,18 @@ const FeedSection = React.forwardRef<SectionRef, FeedSectionProps>( }, ) +function ProfileEndOfFeed() { + const pal = usePalette('default') + + return ( + <View style={[pal.border, {paddingTop: 32, borderTopWidth: 1}]}> + <Text style={[pal.textLight, pal.border, {textAlign: 'center'}]}> + <Trans>End of feed</Trans> + </Text> + </View> + ) +} + const styles = StyleSheet.create({ container: { flexDirection: 'column', |