From 80f58cf9f385d95d0c29b17d6f7d996cf4d09231 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Thu, 19 Jan 2023 15:21:06 -0600 Subject: [PATCH] Fix: ensure all views can scroll to the bottom --- src/view/com/discover/SuggestedFollows.tsx | 1 + src/view/com/login/CreateAccount.tsx | 3 +-- src/view/com/notifications/Feed.tsx | 1 + src/view/com/post-thread/PostRepostedBy.tsx | 1 + src/view/com/post-thread/PostVotedBy.tsx | 1 + src/view/com/profile/ProfileFollowers.tsx | 1 + src/view/com/profile/ProfileFollows.tsx | 1 + src/view/com/util/ViewSelector.tsx | 1 + src/view/lib/styles.ts | 3 +++ src/view/screens/Log.tsx | 2 +- src/view/screens/Search.tsx | 1 + src/view/screens/Settings.tsx | 2 +- src/view/shell/mobile/Menu.tsx | 2 +- 13 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/view/com/discover/SuggestedFollows.tsx b/src/view/com/discover/SuggestedFollows.tsx index 9a012726..87886c65 100644 --- a/src/view/com/discover/SuggestedFollows.tsx +++ b/src/view/com/discover/SuggestedFollows.tsx @@ -128,6 +128,7 @@ export const SuggestedFollows = observer( keyExtractor={item => item._reactKey} renderItem={renderItem} style={s.flex1} + contentContainerStyle={{paddingBottom: 200}} /> )} diff --git a/src/view/com/login/CreateAccount.tsx b/src/view/com/login/CreateAccount.tsx index 83d17d37..279a55f5 100644 --- a/src/view/com/login/CreateAccount.tsx +++ b/src/view/com/login/CreateAccount.tsx @@ -15,7 +15,6 @@ import * as EmailValidator from 'email-validator' import {Logo} from './Logo' import {Picker} from '../util/Picker' import {TextLink} from '../util/Link' -import {ToggleButton} from '../util/forms/ToggleButton' import {Text} from '../util/text/Text' import {s, colors} from '../../lib/styles' import { @@ -366,7 +365,7 @@ export const CreateAccount = ({onPressBack}: {onPressBack: () => void}) => { ) : undefined} - + ) diff --git a/src/view/com/notifications/Feed.tsx b/src/view/com/notifications/Feed.tsx index 59b83bba..ea7695d9 100644 --- a/src/view/com/notifications/Feed.tsx +++ b/src/view/com/notifications/Feed.tsx @@ -76,6 +76,7 @@ export const Feed = observer(function Feed({ onRefresh={onRefresh} onEndReached={onEndReached} onScroll={onScroll} + contentContainerStyle={{paddingBottom: 200}} /> )} diff --git a/src/view/com/post-thread/PostRepostedBy.tsx b/src/view/com/post-thread/PostRepostedBy.tsx index 12d5a217..37ff3ed6 100644 --- a/src/view/com/post-thread/PostRepostedBy.tsx +++ b/src/view/com/post-thread/PostRepostedBy.tsx @@ -75,6 +75,7 @@ export const PostRepostedBy = observer(function PostRepostedBy({ data={view.repostedBy} keyExtractor={item => item._reactKey} renderItem={renderItem} + contentContainerStyle={{paddingBottom: 200}} /> ) diff --git a/src/view/com/post-thread/PostVotedBy.tsx b/src/view/com/post-thread/PostVotedBy.tsx index af5bc247..34a333f2 100644 --- a/src/view/com/post-thread/PostVotedBy.tsx +++ b/src/view/com/post-thread/PostVotedBy.tsx @@ -76,6 +76,7 @@ export const PostVotedBy = observer(function PostVotedBy({ data={view.votes} keyExtractor={item => item._reactKey} renderItem={renderItem} + contentContainerStyle={{paddingBottom: 200}} /> ) diff --git a/src/view/com/profile/ProfileFollowers.tsx b/src/view/com/profile/ProfileFollowers.tsx index 469a91f8..56a4646e 100644 --- a/src/view/com/profile/ProfileFollowers.tsx +++ b/src/view/com/profile/ProfileFollowers.tsx @@ -73,6 +73,7 @@ export const ProfileFollowers = observer(function ProfileFollowers({ data={view.followers} keyExtractor={item => item._reactKey} renderItem={renderItem} + contentContainerStyle={{paddingBottom: 200}} /> ) diff --git a/src/view/com/profile/ProfileFollows.tsx b/src/view/com/profile/ProfileFollows.tsx index 9b413ab7..4fbabff6 100644 --- a/src/view/com/profile/ProfileFollows.tsx +++ b/src/view/com/profile/ProfileFollows.tsx @@ -73,6 +73,7 @@ export const ProfileFollows = observer(function ProfileFollows({ data={view.follows} keyExtractor={item => item._reactKey} renderItem={renderItem} + contentContainerStyle={{paddingBottom: 200}} /> ) diff --git a/src/view/com/util/ViewSelector.tsx b/src/view/com/util/ViewSelector.tsx index c1784c1a..a9252035 100644 --- a/src/view/com/util/ViewSelector.tsx +++ b/src/view/com/util/ViewSelector.tsx @@ -96,6 +96,7 @@ export function ViewSelector({ onScroll={onScroll} onRefresh={onRefresh} onEndReached={onEndReached} + contentContainerStyle={{paddingBottom: 200}} /> ) diff --git a/src/view/lib/styles.ts b/src/view/lib/styles.ts index dcaeab05..0b0145ce 100644 --- a/src/view/lib/styles.ts +++ b/src/view/lib/styles.ts @@ -56,6 +56,9 @@ export const gradients = { } export const s = StyleSheet.create({ + // helpers + footerSpacer: {height: 100}, + // font weights fw600: {fontWeight: '600'}, bold: {fontWeight: 'bold'}, diff --git a/src/view/screens/Log.tsx b/src/view/screens/Log.tsx index 43036b01..34eed394 100644 --- a/src/view/screens/Log.tsx +++ b/src/view/screens/Log.tsx @@ -76,7 +76,7 @@ export const Log = observer(function Log({navIdx, visible}: ScreenParams) { ) })} - + ) diff --git a/src/view/screens/Search.tsx b/src/view/screens/Search.tsx index cd560779..82586e82 100644 --- a/src/view/screens/Search.tsx +++ b/src/view/screens/Search.tsx @@ -89,6 +89,7 @@ export const Search = ({navIdx, visible, params}: ScreenParams) => { ))} + ) : ( diff --git a/src/view/screens/Settings.tsx b/src/view/screens/Settings.tsx index eaf1efeb..22230f24 100644 --- a/src/view/screens/Settings.tsx +++ b/src/view/screens/Settings.tsx @@ -79,7 +79,7 @@ export const Settings = observer(function Settings({ title="Debug tools"> Storybook - + ) diff --git a/src/view/shell/mobile/Menu.tsx b/src/view/shell/mobile/Menu.tsx index 6ffa4c1e..875bb5a3 100644 --- a/src/view/shell/mobile/Menu.tsx +++ b/src/view/shell/mobile/Menu.tsx @@ -175,7 +175,7 @@ export const Menu = observer( {VersionNumber.buildVersion}) - + ) },