1
1
import { FeedViewType } from "@follow/constants"
2
2
import { useTypeScriptHappyCallback } from "@follow/hooks"
3
3
import { useBottomTabBarHeight } from "@react-navigation/bottom-tabs"
4
- import { useHeaderHeight } from "@react-navigation/elements"
5
4
import { FlashList } from "@shopify/flash-list"
6
5
import { Image } from "expo-image"
7
6
import { router } from "expo-router"
@@ -14,13 +13,16 @@ import {
14
13
NavigationContext ,
15
14
} from "@/src/components/common/SafeNavigationScrollView"
16
15
import { ItemPressable } from "@/src/components/ui/pressable/item-pressable"
16
+ import { useDefaultHeaderHeight } from "@/src/hooks/useDefaultHeaderHeight"
17
17
import { useSelectedFeed , useSelectedFeedTitle } from "@/src/modules/feed-drawer/atoms"
18
18
import { useEntry } from "@/src/store/entry/hooks"
19
19
20
20
import { ViewSelector } from "../feed-drawer/view-selector"
21
21
import { LeftAction , RightAction } from "./action"
22
22
import { EntryListContentGrid } from "./entry-list-gird"
23
23
24
+ const headerHideableBottomHeight = 58
25
+
24
26
export function EntryListScreen ( { entryIds } : { entryIds : string [ ] } ) {
25
27
const scrollY = useAnimatedValue ( 0 )
26
28
const selectedFeed = useSelectedFeed ( )
@@ -31,7 +33,7 @@ export function EntryListScreen({ entryIds }: { entryIds: string[] }) {
31
33
< NavigationContext . Provider value = { useMemo ( ( ) => ( { scrollY } ) , [ scrollY ] ) } >
32
34
< NavigationBlurEffectHeader
33
35
headerShown
34
- title = { viewTitle }
36
+ headerTitle = { viewTitle }
35
37
headerLeft = { useCallback (
36
38
( ) => (
37
39
< LeftAction />
@@ -44,7 +46,7 @@ export function EntryListScreen({ entryIds }: { entryIds: string[] }) {
44
46
) ,
45
47
[ ] ,
46
48
) }
47
- headerHideableBottomHeight = { 45 }
49
+ headerHideableBottomHeight = { headerHideableBottomHeight }
48
50
headerHideableBottom = { ViewSelector }
49
51
/>
50
52
{ view === FeedViewType . Pictures || view === FeedViewType . Videos ? (
@@ -59,7 +61,8 @@ export function EntryListScreen({ entryIds }: { entryIds: string[] }) {
59
61
function EntryListContent ( { entryIds } : { entryIds : string [ ] } ) {
60
62
const insets = useSafeAreaInsets ( )
61
63
const tabBarHeight = useBottomTabBarHeight ( )
62
- const headerHeight = useHeaderHeight ( )
64
+ const originalDefaultHeaderHeight = useDefaultHeaderHeight ( )
65
+ const headerHeight = originalDefaultHeaderHeight + headerHideableBottomHeight
63
66
const { scrollY } = useContext ( NavigationContext ) !
64
67
return (
65
68
< FlashList
0 commit comments