diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-04-15 10:15:30 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-15 10:15:30 -0700 |
commit | 91fadadb5848404bc47b69879bbc38a9011a0c62 (patch) | |
tree | 57f6b085b2a81bb33441c7107bd02b89187aec8e /src/view/screens/Home.tsx | |
parent | a79dcd3d3890b2b705cb1e687cf0f31e109fbf74 (diff) | |
download | voidsky-91fadadb5848404bc47b69879bbc38a9011a0c62.tar.zst |
* Fix web home feed sizing (close #432) * Fix lint * Fix positioning of profile not found error * Fix load latest on mobile * Fix overflow issues on mobile web (visible in postthread) * Fix bottom pad on mobile web * Remove old comment
Diffstat (limited to 'src/view/screens/Home.tsx')
-rw-r--r-- | src/view/screens/Home.tsx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/view/screens/Home.tsx b/src/view/screens/Home.tsx index ca9c25f55..1361fc3f2 100644 --- a/src/view/screens/Home.tsx +++ b/src/view/screens/Home.tsx @@ -1,5 +1,5 @@ import React from 'react' -import {FlatList, View, Platform} from 'react-native' +import {FlatList, View} from 'react-native' import {useFocusEffect, useIsFocused} from '@react-navigation/native' import {observer} from 'mobx-react-lite' import useAppState from 'react-native-appstate-hook' @@ -8,7 +8,7 @@ import {PostsFeedModel} from 'state/models/feeds/posts' import {withAuthRequired} from 'view/com/auth/withAuthRequired' import {Feed} from '../com/posts/Feed' import {FollowingEmptyState} from 'view/com/posts/FollowingEmptyState' -import {LoadLatestBtn} from '../com/util/LoadLatestBtn' +import {LoadLatestBtn} from '../com/util/load-latest/LoadLatestBtn' import {FeedsTabBar} from '../com/pager/FeedsTabBar' import {Pager, RenderTabBarFnProps} from 'view/com/pager/Pager' import {FAB} from '../com/util/fab/FAB' @@ -17,9 +17,9 @@ import {s} from 'lib/styles' import {useOnMainScroll} from 'lib/hooks/useOnMainScroll' import {useAnalytics} from 'lib/analytics' import {ComposeIcon2} from 'lib/icons' -import {isDesktopWeb, isMobileWeb} from 'platform/detection' +import {isDesktopWeb} from 'platform/detection' -const HEADER_OFFSET = isDesktopWeb ? 0 : isMobileWeb ? 20 : 40 +const HEADER_OFFSET = isDesktopWeb ? 50 : 40 type Props = NativeStackScreenProps<HomeTabNavigatorParams, 'Home'> export const HomeScreen = withAuthRequired((_opts: Props) => { @@ -191,7 +191,7 @@ const FeedPage = observer( onPressTryAgain={onPressTryAgain} onScroll={onMainScroll} renderEmptyState={renderEmptyState} - headerOffset={Platform.OS === 'web' ? 0 : HEADER_OFFSET} // only offset on mobile + headerOffset={HEADER_OFFSET} /> {feed.hasNewLatest && !feed.isRefreshing && ( <LoadLatestBtn onPress={onPressLoadLatest} label="posts" /> |