Skip to content

Commit c9bae94

Browse files
committed
fix: scroll header height
1 parent 973c0d2 commit c9bae94

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

apps/mobile/src/modules/entry-list/entry-list.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { FeedViewType } from "@follow/constants"
22
import { useTypeScriptHappyCallback } from "@follow/hooks"
33
import { useBottomTabBarHeight } from "@react-navigation/bottom-tabs"
4-
import { useHeaderHeight } from "@react-navigation/elements"
54
import { FlashList } from "@shopify/flash-list"
65
import { Image } from "expo-image"
76
import { router } from "expo-router"
@@ -14,13 +13,16 @@ import {
1413
NavigationContext,
1514
} from "@/src/components/common/SafeNavigationScrollView"
1615
import { ItemPressable } from "@/src/components/ui/pressable/item-pressable"
16+
import { useDefaultHeaderHeight } from "@/src/hooks/useDefaultHeaderHeight"
1717
import { useSelectedFeed, useSelectedFeedTitle } from "@/src/modules/feed-drawer/atoms"
1818
import { useEntry } from "@/src/store/entry/hooks"
1919

2020
import { ViewSelector } from "../feed-drawer/view-selector"
2121
import { LeftAction, RightAction } from "./action"
2222
import { EntryListContentGrid } from "./entry-list-gird"
2323

24+
const headerHideableBottomHeight = 58
25+
2426
export function EntryListScreen({ entryIds }: { entryIds: string[] }) {
2527
const scrollY = useAnimatedValue(0)
2628
const selectedFeed = useSelectedFeed()
@@ -31,7 +33,7 @@ export function EntryListScreen({ entryIds }: { entryIds: string[] }) {
3133
<NavigationContext.Provider value={useMemo(() => ({ scrollY }), [scrollY])}>
3234
<NavigationBlurEffectHeader
3335
headerShown
34-
title={viewTitle}
36+
headerTitle={viewTitle}
3537
headerLeft={useCallback(
3638
() => (
3739
<LeftAction />
@@ -44,7 +46,7 @@ export function EntryListScreen({ entryIds }: { entryIds: string[] }) {
4446
),
4547
[],
4648
)}
47-
headerHideableBottomHeight={45}
49+
headerHideableBottomHeight={headerHideableBottomHeight}
4850
headerHideableBottom={ViewSelector}
4951
/>
5052
{view === FeedViewType.Pictures || view === FeedViewType.Videos ? (
@@ -59,7 +61,8 @@ export function EntryListScreen({ entryIds }: { entryIds: string[] }) {
5961
function EntryListContent({ entryIds }: { entryIds: string[] }) {
6062
const insets = useSafeAreaInsets()
6163
const tabBarHeight = useBottomTabBarHeight()
62-
const headerHeight = useHeaderHeight()
64+
const originalDefaultHeaderHeight = useDefaultHeaderHeight()
65+
const headerHeight = originalDefaultHeaderHeight + headerHideableBottomHeight
6366
const { scrollY } = useContext(NavigationContext)!
6467
return (
6568
<FlashList

0 commit comments

Comments
 (0)