From faf48db67971eb135e8997093255ed7ac8016304 Mon Sep 17 00:00:00 2001 From: Hailey <153161762+haileyok@users.noreply.github.com> Date: Tue, 30 Jan 2024 17:49:34 -0800 Subject: [PATCH] add padding to user's lists/feeds scrollviews (#2675) * add padding to user's lists/feeds scrollviews * always use the header offset for padding --- src/view/com/feeds/ProfileFeedgens.tsx | 6 ++---- src/view/com/lists/ProfileLists.tsx | 8 ++++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/view/com/feeds/ProfileFeedgens.tsx b/src/view/com/feeds/ProfileFeedgens.tsx index 96a04bad..e9cf9e53 100644 --- a/src/view/com/feeds/ProfileFeedgens.tsx +++ b/src/view/com/feeds/ProfileFeedgens.tsx @@ -1,5 +1,5 @@ import React from 'react' -import {Dimensions, StyleProp, StyleSheet, View, ViewStyle} from 'react-native' +import {StyleProp, StyleSheet, View, ViewStyle} from 'react-native' import {useQueryClient} from '@tanstack/react-query' import {List, ListRef} from '../util/List' import {FeedSourceCardLoaded} from './FeedSourceCard' @@ -180,9 +180,7 @@ export const ProfileFeedgens = React.forwardRef< refreshing={isPTRing} onRefresh={onRefresh} headerOffset={headerOffset} - contentContainerStyle={{ - minHeight: Dimensions.get('window').height * 1.5, - }} + contentContainerStyle={isNative && {paddingBottom: headerOffset + 100}} indicatorStyle={theme.colorScheme === 'dark' ? 'white' : 'black'} removeClippedSubviews={true} // @ts-ignore our .web version only -prf diff --git a/src/view/com/lists/ProfileLists.tsx b/src/view/com/lists/ProfileLists.tsx index ba3e95b5..a47b25be 100644 --- a/src/view/com/lists/ProfileLists.tsx +++ b/src/view/com/lists/ProfileLists.tsx @@ -1,5 +1,5 @@ import React from 'react' -import {Dimensions, StyleProp, StyleSheet, View, ViewStyle} from 'react-native' +import {StyleProp, StyleSheet, View, ViewStyle} from 'react-native' import {useQueryClient} from '@tanstack/react-query' import {List, ListRef} from '../util/List' import {ListCard} from './ListCard' @@ -182,9 +182,9 @@ export const ProfileLists = React.forwardRef( refreshing={isPTRing} onRefresh={onRefresh} headerOffset={headerOffset} - contentContainerStyle={{ - minHeight: Dimensions.get('window').height * 1.5, - }} + contentContainerStyle={ + isNative && {paddingBottom: headerOffset + 100} + } indicatorStyle={theme.colorScheme === 'dark' ? 'white' : 'black'} removeClippedSubviews={true} // @ts-ignore our .web version only -prf