Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Hide feeds topbar on scroll (#3108)

authored by

dan and committed by
GitHub
20b88f43 6c9d6f5b

+17 -2
+17 -2
src/view/com/home/HomeHeaderLayout.web.tsx
··· 1 1 import React from 'react' 2 2 import {StyleSheet, View} from 'react-native' 3 + import Animated from 'react-native-reanimated' 3 4 import {usePalette} from 'lib/hooks/usePalette' 4 5 import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries' 5 6 import {HomeHeaderLayoutMobile} from './HomeHeaderLayoutMobile' ··· 12 13 import {useLingui} from '@lingui/react' 13 14 import {msg} from '@lingui/macro' 14 15 import {CogIcon} from '#/lib/icons' 16 + import {useMinimalShellMode} from 'lib/hooks/useMinimalShellMode' 17 + import {useShellLayout} from '#/state/shell/shell-layout' 15 18 16 19 export function HomeHeaderLayout(props: { 17 20 children: React.ReactNode ··· 33 36 tabBarAnchor: JSX.Element | null | undefined 34 37 }) { 35 38 const pal = usePalette('default') 39 + const {headerMinimalShellTransform} = useMinimalShellMode() 40 + const {headerHeight} = useShellLayout() 36 41 const {_} = useLingui() 37 42 38 43 return ( ··· 60 65 </Link> 61 66 </View> 62 67 {tabBarAnchor} 63 - <View style={[pal.view, pal.border, styles.bar, styles.tabBar]}> 68 + <Animated.View 69 + onLayout={e => { 70 + headerHeight.value = e.nativeEvent.layout.height 71 + }} 72 + style={[ 73 + pal.view, 74 + pal.border, 75 + styles.bar, 76 + styles.tabBar, 77 + headerMinimalShellTransform, 78 + ]}> 64 79 {children} 65 - </View> 80 + </Animated.View> 66 81 </> 67 82 ) 68 83 }